services: postgres: image: postgres:18 env_file: - ./.env volumes: - ./docker-data/postgres:/var/lib/postgresql environment: POSTGRES_DB: ${DB_NAME} POSTGRES_USER: ${DB_USER} POSTGRES_PASSWORD: ${DB_PASSWORD} healthcheck: test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"] interval: 10s timeout: 5s retries: 5 restart: unless-stopped api: build: context: ./api env_file: - ./.env depends_on: postgres: condition: service_healthy volumes: - ./docker-data/uploads:/app/uploads expose: - "4000" healthcheck: test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:4000/api/health >/dev/null 2>&1 || exit 1"] interval: 15s timeout: 5s retries: 10 start_period: 20s restart: unless-stopped web: build: context: ./web depends_on: api: condition: service_healthy expose: - "80" healthcheck: test: ["CMD-SHELL", "wget -qO- http://127.0.0.1/ >/dev/null 2>&1 || exit 1"] interval: 15s timeout: 5s retries: 10 start_period: 10s restart: unless-stopped reverse-proxy: image: nginx:1.29-alpine env_file: - ./.env depends_on: web: condition: service_healthy api: condition: service_healthy ports: - "${PUBLIC_HTTP_PORT:-8080}:80" volumes: - ./reverse-proxy/nginx.conf.template:/etc/nginx/templates/default.conf.template:ro - ./docker-data/uploads:/srv/uploads:ro restart: unless-stopped