[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

Closed
opened 2026-02-25 23:42:52 +03:00 by kerem · 3 comments
Owner

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_URL env 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_URL env var. I got a "broken" image icon. I can see the file in the container console, so it is there.

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_URL` env 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_URL` env var. I got a "broken" image icon. I can see the file in the container console, so it is there.
kerem closed this issue 2026-02-25 23:42:52 +03:00
Author
Owner

@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 collectstatic command in the Dockerfile.

<!-- gh-comment-id:1441709154 --> @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 collectstatic` command in the Dockerfile.
Author
Owner

@cuu508 commented on GitHub (Feb 23, 2023):

Another idea would be to build an image based on healthchecks/healthchecks with your logo baked in.

I created an empty folder, and put a logo.png and Dockerfile in there.

The contents of Dockerfile:

FROM healthchecks/healthchecks
COPY logo.png /opt/healthchecks/static-collected/img/

I built the image like so:

docker image build -t logoexperiment .

And then ran it:

docker run \
  --name=healthchecks \
  -p 8000:8000 \
  --restart unless-stopped \
  -e ALLOWED_HOSTS=localhost \
  -e APPRISE_ENABLED=False \
  -e DB=sqlite \
  -e DB_CONN_MAX_AGE=0 \
  -e DB_HOST= \
  -e DB_NAME=/tmp/hc.sqlite \
  -e DB_PASSWORD= \
  -e DB_PORT= \
  -e DB_SSLMODE= \
  -e DB_TARGET_SESSION_ATTRS= \
  -e DB_USER= \
  -e DEBUG=False \
  -e DEFAULT_FROM_EMAIL=healthchecks@example.org \
  -e DISCORD_CLIENT_ID= \
  -e DISCORD_CLIENT_SECRET= \
  -e EMAIL_HOST= \
  -e EMAIL_HOST_PASSWORD= \
  -e EMAIL_HOST_USER= \
  -e EMAIL_PORT=587 \
  -e EMAIL_USE_TLS=True \
  -e EMAIL_USE_VERIFICATION=True \
  -e INTEGRATIONS_ALLOW_PRIVATE_IPS=False \
  -e LINENOTIFY_CLIENT_ID= \
  -e LINENOTIFY_CLIENT_SECRET= \
  -e MASTER_BADGE_LABEL=Mychecks \
  -e MATRIX_ACCESS_TOKEN= \
  -e MATRIX_HOMESERVER= \
  -e MATRIX_USER_ID= \
  -e MATTERMOST_ENABLED=True \
  -e MSTEAMS_ENABLED=True \
  -e OPSGENIE_ENABLED=True \
  -e PAGERTREE_ENABLED=True \
  -e PD_APP_ID= \
  -e PD_ENABLED=True \
  -e PING_BODY_LIMIT=10000 \
  -e PING_EMAIL_DOMAIN=localhost \
  -e PING_ENDPOINT=http://localhost:8000/ping/ \
  -e PROMETHEUS_ENABLED=True \
  -e PUSHBULLET_CLIENT_ID= \
  -e PUSHBULLET_CLIENT_SECRET= \
  -e PUSHOVER_API_TOKEN= \
  -e PUSHOVER_EMERGENCY_EXPIRATION=86400 \
  -e PUSHOVER_EMERGENCY_RETRY_DELAY=300 \
  -e PUSHOVER_SUBSCRIPTION_URL= \
  -e REGISTRATION_OPEN=True \
  -e REMOTE_USER_HEADER= \
  -e RP_ID= \
  -e S3_ACCESS_KEY= \
  -e S3_BUCKET= \
  -e S3_ENDPOINT= \
  -e S3_REGION= \
  -e S3_SECRET_KEY= \
  -e S3_TIMEOUT=60 \
  -e SECRET_KEY=--- \
  -e SHELL_ENABLED=False \
  -e SIGNAL_CLI_SOCKET= \
  -e SITE_LOGO_URL= \
  -e SITE_NAME=Mychecks \
  -e SITE_ROOT=http://localhost:8000 \
  -e SLACK_CLIENT_ID= \
  -e SLACK_CLIENT_SECRET= \
  -e SLACK_ENABLED=True \
  -e SPIKE_ENABLED=True \
  -e TELEGRAM_BOT_NAME=ExampleBot \
  -e TELEGRAM_TOKEN= \
  -e TRELLO_APP_KEY= \
  -e TWILIO_ACCOUNT= \
  -e TWILIO_AUTH= \
  -e TWILIO_FROM= \
  -e TWILIO_USE_WHATSAPP=False \
  -e USE_PAYMENTS=False \
  -e VICTOROPS_ENABLED=True \
  -e WEBHOOKS_ENABLED=True \
  -e ZULIP_ENABLED=True \
  logoexperiment

It did start up and show my custom logo.

<!-- gh-comment-id:1441722417 --> @cuu508 commented on GitHub (Feb 23, 2023): Another idea would be to build an image based on `healthchecks/healthchecks` with your logo baked in. I created an empty folder, and put a `logo.png` and `Dockerfile` in there. The contents of `Dockerfile`: ``` FROM healthchecks/healthchecks COPY logo.png /opt/healthchecks/static-collected/img/ ``` I built the image like so: docker image build -t logoexperiment . And then ran it: ``` docker run \ --name=healthchecks \ -p 8000:8000 \ --restart unless-stopped \ -e ALLOWED_HOSTS=localhost \ -e APPRISE_ENABLED=False \ -e DB=sqlite \ -e DB_CONN_MAX_AGE=0 \ -e DB_HOST= \ -e DB_NAME=/tmp/hc.sqlite \ -e DB_PASSWORD= \ -e DB_PORT= \ -e DB_SSLMODE= \ -e DB_TARGET_SESSION_ATTRS= \ -e DB_USER= \ -e DEBUG=False \ -e DEFAULT_FROM_EMAIL=healthchecks@example.org \ -e DISCORD_CLIENT_ID= \ -e DISCORD_CLIENT_SECRET= \ -e EMAIL_HOST= \ -e EMAIL_HOST_PASSWORD= \ -e EMAIL_HOST_USER= \ -e EMAIL_PORT=587 \ -e EMAIL_USE_TLS=True \ -e EMAIL_USE_VERIFICATION=True \ -e INTEGRATIONS_ALLOW_PRIVATE_IPS=False \ -e LINENOTIFY_CLIENT_ID= \ -e LINENOTIFY_CLIENT_SECRET= \ -e MASTER_BADGE_LABEL=Mychecks \ -e MATRIX_ACCESS_TOKEN= \ -e MATRIX_HOMESERVER= \ -e MATRIX_USER_ID= \ -e MATTERMOST_ENABLED=True \ -e MSTEAMS_ENABLED=True \ -e OPSGENIE_ENABLED=True \ -e PAGERTREE_ENABLED=True \ -e PD_APP_ID= \ -e PD_ENABLED=True \ -e PING_BODY_LIMIT=10000 \ -e PING_EMAIL_DOMAIN=localhost \ -e PING_ENDPOINT=http://localhost:8000/ping/ \ -e PROMETHEUS_ENABLED=True \ -e PUSHBULLET_CLIENT_ID= \ -e PUSHBULLET_CLIENT_SECRET= \ -e PUSHOVER_API_TOKEN= \ -e PUSHOVER_EMERGENCY_EXPIRATION=86400 \ -e PUSHOVER_EMERGENCY_RETRY_DELAY=300 \ -e PUSHOVER_SUBSCRIPTION_URL= \ -e REGISTRATION_OPEN=True \ -e REMOTE_USER_HEADER= \ -e RP_ID= \ -e S3_ACCESS_KEY= \ -e S3_BUCKET= \ -e S3_ENDPOINT= \ -e S3_REGION= \ -e S3_SECRET_KEY= \ -e S3_TIMEOUT=60 \ -e SECRET_KEY=--- \ -e SHELL_ENABLED=False \ -e SIGNAL_CLI_SOCKET= \ -e SITE_LOGO_URL= \ -e SITE_NAME=Mychecks \ -e SITE_ROOT=http://localhost:8000 \ -e SLACK_CLIENT_ID= \ -e SLACK_CLIENT_SECRET= \ -e SLACK_ENABLED=True \ -e SPIKE_ENABLED=True \ -e TELEGRAM_BOT_NAME=ExampleBot \ -e TELEGRAM_TOKEN= \ -e TRELLO_APP_KEY= \ -e TWILIO_ACCOUNT= \ -e TWILIO_AUTH= \ -e TWILIO_FROM= \ -e TWILIO_USE_WHATSAPP=False \ -e USE_PAYMENTS=False \ -e VICTOROPS_ENABLED=True \ -e WEBHOOKS_ENABLED=True \ -e ZULIP_ENABLED=True \ logoexperiment ``` It did start up and show my custom logo.
Author
Owner

@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.png to a local image file in docker run was easy.

Thank you!

<!-- gh-comment-id:1442784501 --> @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.png` to a local image file in docker run was easy. Thank you!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/healthchecks#560
No description provided.