fix(docker): use PORT env var in healthcheck
This commit is contained in:
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user