feat: add healthcheck endpoints, Dockerfiles, and admin middleware configuration

This commit is contained in:
2026-10-21 22:59:35 +02:00
parent f5548ab326
commit 2fdabe1dfd
7 changed files with 50 additions and 1 deletions

View File

@@ -18,5 +18,8 @@ RUN chown -R nextjs:nodejs /app
USER nextjs
HEALTHCHECK --interval=15s --timeout=5s --start-period=60s --retries=5 \
CMD wget --no-verbose --tries=1 --spider http://localhost:3001/api/health || exit 1
# On lance directement via npm (avec push de la BD si besoin, ou juste start)
CMD ["sh", "-c", "npx prisma db push --schema=prisma/schema.prisma --accept-data-loss && (node ../scripts/ensure-admin.cjs || node scripts/ensure-admin.cjs || true) && npm start"]