What is homer-proxy:question: This is a simple docker container that can be used to check if a container is running and return a simple response to be reflect on the health check feature on homer Can also be used to check if a remote endpoint is up and running.
Keep in mind that the endpoint will be queried using
HEAD
http queries, so make sure that those endpoints can answer with a simple HTTP Response Code that will be forwarded directly to homer dashboard.
- Option 1: Build from source
git clone https://git.aymane.xyz/nimda95/homer-proxy.git
cd homer-proxy/
docker build . -t shimgapi/homer-proxy
- Option 2: Pull from docker-hub
docker pull shimgapi/homer-proxy:latest
- Using
docker run
# Simplest possible way
docker run -d -p 3000:3000 shimgapi/homer-proxy
if you changed the image name durring build time, please change-it in the command above accordingly
- Using
docker-compose
Create a file calleddocker-compose.yaml
with the following content
version: "2"
services:
homer-proxy:
image: shimgapi/homer-proxy
container_name: homer-proxy
volumes:
- /var/run/docker.sock:/var/run/docker.sock # needed to check the health of containers
ports:
- 3000:3000 # map to whatever port you like
environment:
- DOCKER_BLACKLIST='' ##################################################
- HOSTNAME_BLACKLIST='' ##----------------------------------------------##
- HOSTNAME_WHITELIST='' ## These variables are self-explanatory I guess ##
- PORT=3000 ##----------------------------------------------##
- DOCKER_WHITELIST='' ##################################################
- CORS_ORIGIN='*' # value to put in the CORS header. Defaults to '*'
restart: unless-stopped
- On Heroku
In this example we assume that the homer-proxy
instance is hosted on https://health.aymane.xyz
... homer config
- name: "Gitea"
logo: "assets/icons/gitea.png"
subtitle: "Git server"
tag: "git"
url: "https://git.aymane.xyz"
target: "_blank"
endpoint: "https://health.aymane.xyz/head/aHR0cHM6Ly9naXQuYXltYW5lLnh5eg"
type: "Ping"
you can use the as follows:
- Track state of docker container
/docker/<containerId or containerName>
- Track health of http(s) endpoint
/head/<base64 encoded endpoint>