feat(deploy): konteyner başlatma adımı ve sağlık kontrolünde replica set
- scripts/bootstrap.ts: replica set/PRIMARY kontrolü, migration'lar, production'da ilk admin - esbuild ile tek dosya (dist/bootstrap.mjs), docker-entrypoint.sh ile uygulamadan önce - /api/health yanıtında replicaSet alanı; healthcheck başlangıç payı 60 sn Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Executable
+9
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
# BÜTÇEM konteyner girişi: önce başlatma (replica set kontrolü, migration'lar, ilk admin),
|
||||
# başarılıysa uygulama. Başlatma başarısız olursa konteyner durur; Dokploy günlüğünde sebep görünür.
|
||||
# Acil durumda atlamak için: SKIP_BOOTSTRAP=1
|
||||
set -e
|
||||
if [ "${SKIP_BOOTSTRAP:-0}" != "1" ]; then
|
||||
node /app/scripts/bootstrap.mjs
|
||||
fi
|
||||
exec node /app/server.js
|
||||
Reference in New Issue
Block a user