diff --git a/Dockerfile b/Dockerfile index 436e1e2..fbbd45a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"]