diff options
| author | JPVenson <github@jpb.email> | 2025-01-27 18:32:36 +0000 |
|---|---|---|
| committer | JPVenson <github@jpb.email> | 2025-01-27 18:32:36 +0000 |
| commit | 4ce0d498abe1c52f92805a2cb04cbcfe3218817e (patch) | |
| tree | 02b75baedfcd55ca0521b9f5e709152223ed57c3 /.devcontainer/pgsql/docker-compose.yaml | |
| parent | ce00bc076e9a97197e7e7e83276013518ce84ec5 (diff) | |
Added pgsql devcontainer
Diffstat (limited to '.devcontainer/pgsql/docker-compose.yaml')
| -rw-r--r-- | .devcontainer/pgsql/docker-compose.yaml | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/.devcontainer/pgsql/docker-compose.yaml b/.devcontainer/pgsql/docker-compose.yaml new file mode 100644 index 000000000..88954d564 --- /dev/null +++ b/.devcontainer/pgsql/docker-compose.yaml @@ -0,0 +1,51 @@ +version: '3.8' + +services: + app: + build: + context: . + dockerfile: Dockerfile + + volumes: + - ../..:/workspaces:cached + + # 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:pgadmin + + # Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + # user: root + + # 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:14.3 + restart: unless-stopped + volumes: + - postgres-data:/var/lib/postgresql/data + environment: + POSTGRES_PASSWORD: jellyfin + POSTGRES_USER: password + POSTGRES_DB: Jellyfin + pgadmin: + image: dpage/pgadmin4 + restart: unless-stopped + volumes: + - ./pgadmin:/pgadmin + - pgadmin-data:/var/lib/pgadmin + environment: + - PGADMIN_DEFAULT_EMAIL=user@domain.com + - PGADMIN_DEFAULT_PASSWORD=SuperSecret + - PGADMIN_LISTEN_PORT=8081 + - PGADMIN_SERVER_JSON_FILE=/pgadmin/servers.json + - PGADMIN_CONFIG_SERVER_MODE=False + + # Add "forwardPorts": ["5432"] to **devcontainer.json** to forward PostgreSQL locally. + # (Adding the "ports" property to this file will not forward from a Codespace.) + +volumes: + postgres-data: + pgadmin-data: |
