Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .devcontainer/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
POSTGRES_USER=postgres
POSTGRES_PASSWORD=abc123
POSTGRES_DB=postgres
POSTGRES_HOST=postgres
POSTGRES_PORT=5432

ZENSTACK_TEST_DB_USER=postgres
ZENSTACK_TEST_DB_PASS=abc123
ZENSTACK_TEST_DB_NAME=postgres
ZENSTACK_TEST_DB_HOST=postgres
ZENSTACK_TEST_DB_PORT=5432
20 changes: 20 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "zenstack",
"dockerComposeFile": [
"./docker-compose.yml"
],
"workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind",
"workspaceFolder": "/workspace",
"service": "workspace",
"shutdownAction": "stopCompose",
"postCreateCommand": "npm i -g [email protected] && pnpm install && pnpm build && pnpm test-scaffold",
"remoteUser": "node",
"customizations": {
"vscode": {
"extensions": [
"langium.langium-vscode",
"firsttris.vscode-jest-runner"
]
}
}
}
37 changes: 37 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: zenstack

volumes:
postgres-data:

networks:
workspace:
external: false

services:
workspace:
container_name: zenstack-workspace
image: mcr.microsoft.com/devcontainers/javascript-node:20
restart: always
volumes:
- ..:/workspace:cached
env_file: ./.env
command: sleep infinity
networks:
- workspace

postgres:
container_name: zenstack-postgres
image: postgres
restart: always
volumes:
- postgres-data:/var/lib/postgresql/
env_file: ./.env
networks:
- workspace
ports:
- 5432:5432
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 5s
timeout: 5s
retries: 5
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ dist
coverage
.build
.test
.pnpm-store
Loading