31 lines
957 B
YAML
31 lines
957 B
YAML
# Dev compose — provides a local Postgres for `npm run dev`.
|
|
# The lab itself runs natively via `npm run dev` for fast iteration.
|
|
#
|
|
# Replaces backend/docker-compose.yml at the repo root so dev and prod
|
|
# compose files live side-by-side. Container name and volume name are kept
|
|
# the same as the old backend compose so existing local data is preserved.
|
|
#
|
|
# Connect from the host with:
|
|
# DATABASE_URL=postgres://ca_studio:ca_studio@localhost:54329/ca_studio_test
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
container_name: ca-studio-postgres
|
|
environment:
|
|
POSTGRES_USER: ca_studio
|
|
POSTGRES_PASSWORD: ca_studio
|
|
POSTGRES_DB: ca_studio_test
|
|
ports:
|
|
- "54329:5432"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ca_studio -d ca_studio_test"]
|
|
interval: 2s
|
|
timeout: 5s
|
|
retries: 20
|
|
volumes:
|
|
- ca-studio-postgres-data:/var/lib/postgresql/data
|
|
|
|
volumes:
|
|
ca-studio-postgres-data:
|