ask-your-warehouse / docker-compose.yml
Ashsinha1's picture
Upload 5 files
8d9d6ed verified
Raw
History Blame Contribute Delete
554 Bytes
services:
postgres:
image: postgres:17-alpine
container_name: sqldemo-postgres
environment:
POSTGRES_DB: warehouse
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "5432:5432"
volumes:
# Files here run once, on first boot of an empty data volume.
- ./init:/docker-entrypoint-initdb.d:ro
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d warehouse"]
interval: 3s
timeout: 3s
retries: 20
volumes:
pgdata: