mirror of
https://github.com/healthchecks/healthchecks.git
synced 2026-04-25 15:05:49 +03:00
[GH-ISSUE #797] Finally got around to implement this: there is now a SITE_LOGO_URL env var which you can point to a custom logo image. #560
Labels
No labels
bug
bug
bug
feature
good-first-issue
new integration
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/healthchecks#560
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @JBBBB on GitHub (Feb 23, 2023).
Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/797
I cannot get this to work. I have tried every permutation of bind mounts or volumes and
SITE_LOGO_URLenv var references that I can think of, and nothing works.For the latest attempt, I created a bind mount specifically to /site/img/logo.png, which looks like...
--mount type=bind,source=/docker/volumes/healthchecks_logo/_data/healthchecks.png,target=/opt/healthchecks/static/img/logo.png \
I know the bind mount is substituting my healthchecks.png for the placeholder logo.png because, when accessed in the container shell, the logo.png file has the identical size and time stamp as my substituted file; however, the old placeholder image is still being used. How is that happening?
I even cloned the entire /static/img folder from Github into a volume...
--volume healthchecks_static_img:/opt/healthchecks/static/img \
All the files were there and the container runs. I tried substituting logo.png, but placeholder was still used. I also tried placing healthchecks.png into the volume so that it was in the /sites/img directory and then referencing it with the
SITE_LOGO_URLenv var. I got a "broken" image icon. I can see the file in the container console, so it is there.@cuu508 commented on GitHub (Feb 23, 2023):
Try injecting the logo in
/opt/healthchecks/static-collected/img/logo.png.Healthchecks serves static files from the static-collected directory. The directory gets populated when building the container image, by the
manage.py collectstaticcommand in the Dockerfile.@cuu508 commented on GitHub (Feb 23, 2023):
Another idea would be to build an image based on
healthchecks/healthcheckswith your logo baked in.I created an empty folder, and put a
logo.pngandDockerfilein there.The contents of
Dockerfile:I built the image like so:
And then ran it:
It did start up and show my custom logo.
@JBBBB commented on GitHub (Feb 24, 2023):
Your first suggestion worked like a charm! The second suggestion certainly is an option; however, adding a bind mount for
/opt/healthchecks/static-collected/img/logo.pngto a local image file in docker run was easy.Thank you!