🚀 Patch auto
This commit is contained in:
@@ -1,45 +1,44 @@
|
||||
services:
|
||||
db:
|
||||
image: postgres:16-alpine
|
||||
image: postgres:16
|
||||
container_name: supersunday_db
|
||||
environment:
|
||||
POSTGRES_DB: ${POSTGRES_DB:-supersunday}
|
||||
POSTGRES_USER: ${POSTGRES_USER:-supersunday}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-supersunday}
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_DB: supersunday
|
||||
volumes:
|
||||
- db_data:/var/lib/postgresql/data
|
||||
- ./db/init:/docker-entrypoint-initdb.d:ro
|
||||
- ./data/db:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-supersunday} -d ${POSTGRES_DB:-supersunday}"]
|
||||
test: ["CMD-SHELL", "pg_isready -U postgres -d supersunday -h localhost"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
timeout: 3s
|
||||
retries: 20
|
||||
start_period: 10s
|
||||
|
||||
api:
|
||||
build: ./backend
|
||||
env_file: .env
|
||||
container_name: supersunday_api
|
||||
env_file:
|
||||
- ./backend/.env
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
expose:
|
||||
- "8080"
|
||||
- "4000"
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-qO-", "http://localhost:8080/api/health"]
|
||||
test: ["CMD-SHELL", "curl -fsS http://localhost:4000/api/health || exit 1"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 20
|
||||
timeout: 3s
|
||||
retries: 12
|
||||
start_period: 30s
|
||||
|
||||
web:
|
||||
build: ./frontend
|
||||
image: nginx:alpine
|
||||
container_name: supersunday_web
|
||||
depends_on:
|
||||
api:
|
||||
condition: service_healthy
|
||||
ports:
|
||||
- "80:80"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "wget -qO- http://localhost/health || exit 1"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 20
|
||||
|
||||
volumes:
|
||||
db_data:
|
||||
- "80:80" # Tout le trafic arrive sur Nginx
|
||||
volumes:
|
||||
- ./frontend/public:/usr/share/nginx/html:ro
|
||||
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
||||
|
||||
Reference in New Issue
Block a user