Docker Healthcheck
#13180
Replies: 1 comment
-
Figured out a few things, I'm also now using pm2 to run next in the background, but still no healthcheck. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey there, I've got a pretty simple Docker file set up with Node 14 Alpine and a standard next.js install. The important bits are reproduced below.
Dockerfile
This runs pretty well from the parent docker compose
However when running from the Docker compose file, the healthchecks never log to output
I believe this is happening because the CMD (
npm run start
) never returns control to the script. In other words it's not acting like a daemon, instead it's a foreground task. Is there a mode to start the production server in the background? Is that really why Healthchecks are never logging?Any help is appreciated, thanks!
Beta Was this translation helpful? Give feedback.
All reactions