services: postgres: image: postgres:16-alpine restart: unless-stopped environment: POSTGRES_DB: ${POSTGRES_DB:-jean_ci} POSTGRES_USER: ${POSTGRES_USER:-jean_ci} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} healthcheck: test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-jean_ci} -d ${POSTGRES_DB:-jean_ci}"] interval: 10s timeout: 5s retries: 10 volumes: - postgres-data:/var/lib/postgresql/data app: build: context: . dockerfile: Dockerfile restart: unless-stopped depends_on: postgres: condition: service_healthy env_file: - .env environment: DATABASE_URL: ${DATABASE_URL} BASE_URL: ${BASE_URL:-http://localhost:3000} NEXT_PUBLIC_BASE_URL: ${NEXT_PUBLIC_BASE_URL:-http://localhost:3000} PORT: ${PORT:-3000} NODE_ENV: ${NODE_ENV:-production} DATA_DIR: ${DATA_DIR:-/data} ports: - "3000:3000" volumes: - app-data:/data volumes: postgres-data: app-data: