Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker HealthCheck failing on custom web port #438

Open
Pwnobbypure opened this issue Dec 7, 2022 · 1 comment
Open

Docker HealthCheck failing on custom web port #438

Pwnobbypure opened this issue Dec 7, 2022 · 1 comment

Comments

@Pwnobbypure
Copy link

The HealthCheck url currently seems to be hardcoded to port 1080

HEALTHCHECK --interval=10s --timeout=1s \
  CMD wget -O - http://localhost:1080/healthz || exit 1

Since we can supply a custom web port for maildev with the MAILDEV_WEB_PORT environment variable, this means that the HealthCheck will start failing because maildev is no longer listening to port 1080 for internal web traffic.

I'm wondering if the port used in the HealthCheck url should reference the environment variable instead of being hardcoded as 1080?

@fbatiga
Copy link

fbatiga commented Dec 30, 2022

You can change the port to whatever you like using docker compose

    healthcheck:
      test: ['CMD', 'wget', '-O -', 'http://localhost:80/healthz']
      interval: 10s
      timeout: 10s
      retries: 3
      start_period: 40s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants