asteroid/docker/docker-compose.yml

30 lines
729 B
YAML

services:
postgres:
image: postgres:17-alpine
container_name: asteroid-postgres
environment:
- POSTGRES_DB=${ASTEROID_DB_NAME:-asteroid}
- POSTGRES_USER=${ASTEROID_DB_USER:-asteroid}
- POSTGRES_PASSWORD=${ASTEROID_DB_PASSWORD:-asteroid_db_2025}
ports:
- "127.0.0.1:5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
- ./init-db.sql:/docker-entrypoint-initdb.d/init-db.sql:ro
restart: unless-stopped
networks:
- asteroid-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U asteroid"]
interval: 10s
timeout: 5s
retries: 5
networks:
asteroid-network:
driver: bridge
volumes:
postgres-data:
driver: local