Verified Commit 9e65e49c authored by Quentin Duchemin's avatar Quentin Duchemin
Browse files

Make Alertmanager web interface available to the outside world

parent d1057aed
......@@ -8,4 +8,4 @@ USER root
RUN chmod +x /entrypoint.sh
ENTRYPOINT [ "/entrypoint.sh" ]
CMD [ "/bin/alertmanager", "--config.file=/etc/amtool/config.yml", "--storage.path=/alertmanager" ]
CMD [ "--config.file=/etc/amtool/config.yml", "--storage.path=/alertmanager" ]
......@@ -17,5 +17,5 @@ cp /config/alertmanager.yml /etc/amtool/config.yml
sed -i "s@\$MATTERMOST_WEBHOOK@${MATTERMOST_WEBHOOK}@g" /etc/amtool/config.yml
sed -i "s@\$MATTERMOST_CHANNEL@${MATTERMOST_CHANNEL}@g" /etc/amtool/config.yml
# Substitue shell with `command` in Dockerfile
exec $@
# Substitue shell with alertmanager + arguments passed in Docker CMD
exec /bin/alertmanager $@
......@@ -107,6 +107,19 @@ services:
# Unnamed volume declared in original Dockerfile
- alertmanager:/alertmanager
env_file: ./secrets/alertmanager.secrets
labels:
# For alertmanager web interface
traefik.http.routers.alertmanager.entrypoints: websecure
traefik.http.routers.alertmanager.rule: "Host(`alertmanager.picasoft.net`)"
traefik.http.routers.alertmanager.service: alertmanager
traefik.http.routers.alertmanager.middlewares: "alertmanager-auth@docker"
traefik.http.middlewares.alertmanager-auth.basicauth.users: "${ALERTMANAGER_AUTH}"
traefik.http.services.alertmanager.loadbalancer.server.port: 9094
traefik.enable: true
command:
- "--config.file=/etc/amtool/config.yml"
- "--storage.path=/alertmanager"
- "--web.external-url=https://alertmanager.picasoft.net"
networks:
- metrics
restart: unless-stopped
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment