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

Allow changing the port in the healthcheck for the minidlna image #247

Merged
merged 3 commits into from
Aug 9, 2023

Conversation

Hadatko
Copy link
Contributor

@Hadatko Hadatko commented Aug 9, 2023

Not tested but i believe this may fix healthcheck
details: #246

@Hadatko Hadatko requested a review from vladgh as a code owner August 9, 2023 13:49
@vladgh
Copy link
Owner

vladgh commented Aug 9, 2023

This will not work because it will try to parse an ENV variable when building the image. It needs to be escaped here so that it's parsed only when the container starts, with the variables passed at runtime if that's possible. I will look into how that works.

@Hadatko
Copy link
Contributor Author

Hadatko commented Aug 9, 2023

Hmm from what i readi i am not sure but answer is likely no change need be done or double $ (for compose solution i read that answer is $$)

@vladgh
Copy link
Owner

vladgh commented Aug 9, 2023

Can you please change your code to this:

HEALTHCHECK --interval=10s --timeout=10s --retries=6 CMD \
  curl --silent --fail 127.0.0.1:"${MINIDLNA_PORT:-8200}" || exit 1

I have done some tests, and it seems to work. I will merge it after you change it.

@Hadatko
Copy link
Contributor Author

Hadatko commented Aug 9, 2023

Sure. Great that it is working straightforward.

@Hadatko
Copy link
Contributor Author

Hadatko commented Aug 9, 2023

Done

@vladgh vladgh added the bug Something isn't working label Aug 9, 2023
@vladgh vladgh self-assigned this Aug 9, 2023
@vladgh vladgh changed the title Update Dockerfile Allow changing the port in the healthcheck for the minidlna image Aug 9, 2023
Copy link
Owner

@vladgh vladgh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

@Hadatko
Copy link
Contributor Author

Hadatko commented Aug 9, 2023

Happy to help

@vladgh vladgh merged commit f4de23d into vladgh:main Aug 9, 2023
3 checks passed
@Hadatko Hadatko deleted the bugfix/port branch August 9, 2023 14:27
@Hadatko Hadatko restored the bugfix/port branch August 9, 2023 14:27
@Hadatko Hadatko deleted the bugfix/port branch August 9, 2023 14:27
@Hadatko Hadatko restored the bugfix/port branch August 9, 2023 14:27
@Hadatko Hadatko deleted the bugfix/port branch August 9, 2023 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants