Files
GenExam-IA/docker-compose.yml
T
2026-05-13 13:48:42 +02:00

43 lines
915 B
YAML

services:
backend:
build:
context: ./backend
env_file:
- ./backend/.env
environment:
DATABASE_URL: postgresql+psycopg://genexamenes:genexamenes@db:5432/genexamenes
ports:
- "8000:8000"
depends_on:
db:
condition: service_healthy
restart: unless-stopped
frontend:
image: nginx:1.27-alpine
ports:
- "3000:80"
volumes:
- ./frontend:/usr/share/nginx/html:ro
restart: unless-stopped
db:
image: postgres:16-alpine
environment:
POSTGRES_DB: genexamenes
POSTGRES_USER: genexamenes
POSTGRES_PASSWORD: genexamenes
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U genexamenes -d genexamenes"]
interval: 5s
timeout: 5s
retries: 10
restart: unless-stopped
volumes:
postgres_data: