Add postgres to devcontainer / compose

This commit is contained in:
Willem van den Ende
2026-03-18 11:22:54 +00:00
parent 2d97353649
commit 7c3aac56ec
5 changed files with 45 additions and 6 deletions
+28
View File
@@ -0,0 +1,28 @@
services:
app:
build:
context: .
dockerfile: Dockerfile
volumes:
- ..:/workspaces/firehose:cached
command: sleep infinity
depends_on:
db:
condition: service_healthy
db:
image: postgres:16
restart: unless-stopped
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
volumes:
pgdata: