1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- services:
- app:
- build:
- context: .
- dockerfile: Dockerfile
- args:
- # Update 'VARIANT' to pick an LTS version of Node.js: 18, 16, 14, 12.
- # Append -bullseye or -buster to pin to an OS version.
- # Use -bullseye variants on local arm64/Apple Silicon.
- VARIANT: 22-bookworm
- volumes:
- - ..:/workspace
- - wiki-vscode-ext:/root/.vscode-server/extensions
- # Overrides default command so things don't shut down after the process ends.
- command: sleep infinity
- # Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function.
- network_mode: service:db
- # Uncomment the next line to use a non-root user for all processes.
- # user: node
- # Use "forwardPorts" in **devcontainer.json** to forward an app port locally.
- # (Adding the "ports" property to this file will not forward from a Codespace.)
- db:
- image: postgres:16
- restart: unless-stopped
- volumes:
- - postgres-data:/var/lib/postgresql/data
- environment:
- POSTGRES_PASSWORD: postgres
- POSTGRES_USER: postgres
- POSTGRES_DB: postgres
- pgadmin:
- image: dpage/pgadmin4:latest
- environment:
- - PGADMIN_DEFAULT_EMAIL=dev@js.wiki
- - PGADMIN_DEFAULT_PASSWORD=123123
- - PGADMIN_DISABLE_POSTFIX=True
- - PGADMIN_LISTEN_PORT=8000
- - PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED=False
- - PGADMIN_CONFIG_LOGIN_BANNER="Login with dev@js.wiki / 123123"
- network_mode: service:db
- # volumes:
- # - ./pgadmin-servers.json:/pgadmin4/servers.json
- volumes:
- postgres-data:
- wiki-vscode-ext:
|