services: app: build: context: ../.. container_name: portail-associations-preprod-app init: true depends_on: db: condition: service_healthy environment: NODE_ENV: production PORT: 3000 DATABASE_URL: mysql://portail_preprod:portail_preprod_password@db:3306/portail_associations_preprod JWT_SECRET: ${JWT_SECRET} ADMIN_EMAIL: ${ADMIN_EMAIL} BOOTSTRAP_ADMIN_EMAIL: ${BOOTSTRAP_ADMIN_EMAIL} BOOTSTRAP_ADMIN_PASSWORD: ${BOOTSTRAP_ADMIN_PASSWORD} BOOTSTRAP_ADMIN_NAME: ${BOOTSTRAP_ADMIN_NAME} BOOTSTRAP_USERS: ${BOOTSTRAP_USERS} SMTP_PROVIDER: ${SMTP_PROVIDER:-} SMTP_HOST: ${SMTP_HOST:-} SMTP_PORT: ${SMTP_PORT:-} SMTP_USER: ${SMTP_USER:-} SMTP_PASS: ${SMTP_PASS:-} SMTP_FROM: ${SMTP_FROM:-} SMTP_SECURE: ${SMTP_SECURE:-} SMTP_REQUIRE_TLS: ${SMTP_REQUIRE_TLS:-} APP_BASE_URL: ${APP_BASE_URL} APP_READY_DELAY_MS: ${APP_READY_DELAY_MS:-8000} GRACEFUL_SHUTDOWN_TIMEOUT_MS: ${GRACEFUL_SHUTDOWN_TIMEOUT_MS:-20000} MAINTENANCE_FLAG_PATH: ${MAINTENANCE_FLAG_PATH:-/app/uploads/system/maintenance.flag} ENTREPRISE_API_TOKEN: ${ENTREPRISE_API_TOKEN:-} GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID:-} GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET:-} FACEBOOK_APP_ID: ${FACEBOOK_APP_ID:-} FACEBOOK_APP_SECRET: ${FACEBOOK_APP_SECRET:-} ports: - "3001:3000" volumes: - portail_associations_preprod_uploads:/app/uploads command: sh -c "pnpm exec drizzle-kit migrate && exec pnpm start" healthcheck: test: ["CMD-SHELL", "wget -q -O - http://127.0.0.1:3000/health/ready | grep '\"ok\":true' >/dev/null"] interval: 10s timeout: 4s retries: 12 start_period: 25s stop_grace_period: 25s restart: unless-stopped db: image: mysql:8.4 container_name: portail-associations-preprod-db environment: MYSQL_DATABASE: portail_associations_preprod MYSQL_USER: portail_preprod MYSQL_PASSWORD: portail_preprod_password MYSQL_ROOT_PASSWORD: root_preprod_password ports: - "3308:3306" volumes: - portail_associations_preprod_mysql:/var/lib/mysql healthcheck: test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "portail_preprod", "-pportail_preprod_password"] interval: 5s timeout: 5s retries: 20 restart: unless-stopped volumes: portail_associations_preprod_mysql: portail_associations_preprod_uploads: