File size: 1,503 Bytes
b4f2238 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | services:
postgres:
image: postgres:16
environment:
POSTGRES_DB: ${DB_NAME:-fachuan_dev}
POSTGRES_USER: ${DB_USER:-postgres}
POSTGRES_PASSWORD: ${DB_PASSWORD:-postgres}
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-postgres} -d ${DB_NAME:-fachuan_dev}"]
interval: 10s
timeout: 5s
retries: 10
start_period: 20s
restart: unless-stopped
web:
build: .
ports:
- "8002:8002"
volumes:
- media-data:/app/apiSystem/media
env_file:
- .env
environment:
DB_ENGINE: ${DB_ENGINE:-postgresql}
DB_HOST: postgres
DB_PORT: ${DB_PORT:-5432}
depends_on:
postgres:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8002/admin/login/"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
qcluster:
build: .
entrypoint: ["sh", "-c", "cd /app/apiSystem && uv run python manage.py qcluster"]
volumes:
- media-data:/app/apiSystem/media
env_file:
- .env
environment:
DB_ENGINE: ${DB_ENGINE:-postgresql}
DB_HOST: postgres
DB_PORT: ${DB_PORT:-5432}
depends_on:
postgres:
condition: service_healthy
web:
condition: service_healthy
restart: unless-stopped
volumes:
postgres-data:
media-data:
|