- Add dance-lessons-coach-network to both compose files - Ensure build-cache and postgres containers can communicate - Fix container-to-container connectivity - Maintain same network name for consistency Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
container_name: dance-lessons-coach-postgres
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_DB: dance_lessons_coach
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- dance-lessons-coach-network
|
|
restart: unless-stopped
|
|
|
|
# Application service (for reference)
|
|
# app:
|
|
# build: .
|
|
# container_name: dance-lessons-coach-app
|
|
# ports:
|
|
# - "8080:8080"
|
|
# environment:
|
|
# - DLC_DATABASE_HOST=postgres
|
|
# - DLC_DATABASE_PORT=5432
|
|
# - DLC_DATABASE_USER=postgres
|
|
# - DLC_DATABASE_PASSWORD=postgres
|
|
# - DLC_DATABASE_NAME=dance_lessons_coach
|
|
# - DLC_DATABASE_SSL_MODE=disable
|
|
# depends_on:
|
|
# postgres:
|
|
# condition: service_healthy
|
|
# restart: unless-stopped
|
|
|
|
volumes:
|
|
postgres_data:
|
|
driver: local
|
|
|
|
networks:
|
|
dance-lessons-coach-network:
|
|
name: dance-lessons-coach-network
|
|
driver: bridge |