add production compose healthcheck

This commit is contained in:
2026-09-06 18:51:29 +03:00
parent 45bf0870ba
commit cd8ae58aa7
3 changed files with 53 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
services:
ihaleist:
image: ${IHALEIST_IMAGE:-ihaleist:latest}
restart: unless-stopped
ports:
- "${IHALEIST_PORT:-80}:80"
environment:
NODE_ENV: production
AUTH_SECRET: ${AUTH_SECRET:?AUTH_SECRET must be set}
APP_URL: ${APP_URL:-https://ihaleist.com}
CORS_ORIGINS: ${CORS_ORIGINS:-https://ihaleist.com}
UYUM_GOMME: ${UYUM_GOMME:-0}
TELEGRAM_BOT_TOKEN: ${TELEGRAM_BOT_TOKEN:-}
RESEND_API_KEY: ${RESEND_API_KEY:-}
RESEND_FROM: ${RESEND_FROM:-}
GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID:-}
GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET:-}
STRIPE_SECRET_KEY: ${STRIPE_SECRET_KEY:-}
STRIPE_WEBHOOK_SECRET: ${STRIPE_WEBHOOK_SECRET:-}
volumes:
- ihaleist-data:/app/server/data
healthcheck:
test: ["CMD", "node", "-e", "fetch('http://127.0.0.1:80/api/ready').then(r=>{if(!r.ok) process.exit(1)}).catch(()=>process.exit(1))"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
volumes:
ihaleist-data: