fix(docker): use PORT env var in healthcheck

This commit is contained in:
Julien Calixte
2026-04-22 14:11:57 +02:00
parent a2cd9693a3
commit e1aa33fa7b

View File

@@ -26,7 +26,7 @@ USER denouser
# Health check
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD deno eval "fetch('http://localhost:8000/health').then(r => r.ok ? Deno.exit(0) : Deno.exit(1))" || exit 1
CMD deno eval "fetch('http://localhost:' + (Deno.env.get('PORT') || '8000') + '/health').then(r => r.ok ? Deno.exit(0) : Deno.exit(1))" || exit 1
# Run the application
CMD ["deno", "run", "--allow-net", "--allow-env", "src/main.ts"]