You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
wiki/.devcontainer/docker-compose.yml

55 lines
1.5 KiB

version: '3.8'
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: 18-bullseye
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:16beta1
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
network_mode: service:db
# volumes:
# - ./pgadmin-servers.json:/pgadmin4/servers.json
volumes:
postgres-data:
wiki-vscode-ext: