Created
September 6, 2019 09:56
-
-
Save madic-creates/83300084f36f112f5e54a951da45af3c to your computer and use it in GitHub Desktop.
Alerta with traefik
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"endpoint": "http://172.18.10.60/alerta/api"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "2.3" | |
services: | |
traefik: | |
image: traefik | |
networks: | |
proxy: | |
ports: | |
- "80:80" | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock:ro | |
- ./traefik/traefik.toml:/etc/traefik/traefik.toml:ro | |
labels: | |
- "traefik.enable=true" | |
- "traefik.backend=traefik" | |
- "traefik.frontend.rule=PathPrefixStrip:/traefik" | |
- "traefik.port=8080" | |
container_name: traefik | |
restart: always | |
web: | |
build: . | |
image: alerta/alerta-web | |
depends_on: | |
- db | |
volumes: | |
- ./traefik/config.json:/web/config.json | |
environment: | |
- DATABASE_URL=postgres://postgres:postgres@db:5432/monitoring | |
#- AUTH_REQUIRED=True | |
#- [email protected],[email protected] | |
- PLUGINS=reject,blackout,normalise,enhance,prometheus | |
#- USE_PROXYFIX=True | |
- BASE_URL=/alerta/api | |
restart: always | |
networks: | |
proxy: | |
aliases: | |
- alerta | |
container_name: alerta | |
labels: | |
- "traefik.backend=alerta" | |
#- "traefik.frontend.rule=PathPrefix:/alerta, /config.json, /js, /audio" | |
- "traefik.frontend.rule=PathPrefix:/alerta" | |
- "traefik.enable=true" | |
- "traefik.port=8080" | |
- "traefik.passHostHeader=true" | |
db: | |
image: postgres | |
volumes: | |
- ./pg-data:/var/lib/postgresql/data | |
environment: | |
POSTGRES_DB: monitoring | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
restart: always | |
networks: | |
proxy: | |
aliases: | |
- postgres | |
container_name: postgres | |
networks: | |
proxy: | |
enable_ipv6: false | |
name: proxy | |
ipam: | |
config: | |
- subnet: 172.19.1.0/24 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
logLevel = "INFO" | |
InsecureSkipVerify = true | |
defaultEntryPoints = ["http"] | |
[api] | |
entryPoint = "traefik" | |
dashboard = true | |
[entryPoints] | |
[entryPoints.http] | |
address = ":80" | |
[entryPoints.traefik] | |
address = ":8080" | |
[retry] | |
[docker] | |
endpoint = "unix:///var/run/docker.sock" | |
domain = "example.com" | |
watch = true | |
exposedbydefault = false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment