This repository has been archived on 2021-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
alerta/compose.yml

135 lines
3.5 KiB
YAML
Raw Normal View History

2021-01-08 12:45:22 +00:00
---
version: "3.8"
2021-01-08 13:38:00 +00:00
x-configs: &default-configs
2021-01-08 12:45:22 +00:00
- source: config_json
target: /web/config.json
- source: alertad_conf
target: /app/alertad.conf
- source: alerta_conf
target: /app/alerta.conf
- source: email_tmpl
target: /app/email.tmpl
2021-01-08 13:38:00 +00:00
x-secrets: &default-secrets
2021-01-08 12:45:22 +00:00
- cli_api_key
- db_root_password
- mailer_api_key
- oauth_client_secret
- rocket_chat_webhook_url
- secret_key
- smtp_password
2021-01-08 13:38:00 +00:00
x-environment: &default-env
2021-01-08 12:45:22 +00:00
- ADMIN_USERS=${ADMIN_USERS}
2021-01-08 12:46:27 +00:00
- DEBUG=${DEBUG}
2021-01-08 12:45:22 +00:00
- DOMAIN=${DOMAIN}
- KEYCLOAK_REALM=${KEYCLOAK_REALM}
- KEYCLOAK_ROLE=${KEYCLOAK_ROLE}
- KEYCLOAK_URL=${KEYCLOAK_URL}
- MAIL_FROM=${MAIL_FROM}
- MAIL_TO=${MAIL_TO}
2021-01-08 14:03:28 +00:00
- MONGODB_ADDR=db:27017
2021-01-08 12:45:22 +00:00
- MONGODB_NAME=alerta
- MONGODB_TYPE=mongodb
- MONGODB_USER=alerta
- OAUTH2_CLIENT_ID=${OAUTH2_CLIENT_ID}
- ROCKET_CHAT_ALERTA_USERNAME=${ROCKET_CHAT_ALERTA_USERNAME}
- ROCKET_CHAT_CHANNEL=${ROCKET_CHAT_CHANNEL}
- ROCKET_CHAT_ICON_EMOJI=${ROCKET_CHAT_ICON_EMOJI}
- SMTP_HOST=${SMTP_HOST}
- SMTP_PORT=${SMTP_PORT}
- SMTP_STARTTLS=${SMTP_STARTTLS}
- SMTP_USERNAME=${SMTP_USERNAME}
services:
2021-01-08 13:38:06 +00:00
web:
2021-01-08 12:45:22 +00:00
image: "decentral1se/alerta:8.3.3"
2021-01-08 13:08:18 +00:00
configs: *default-configs
2021-01-08 12:45:22 +00:00
environment: *default-env
2021-01-08 13:08:18 +00:00
secrets: *default-secrets
2021-01-08 12:45:22 +00:00
deploy:
update_config:
failure_action: rollback
order: start-first
labels:
- "traefik.enable=true"
- "traefik.http.routers.gitea.rule=Host(`${DOMAIN}`)"
- "traefik.http.routers.gitea.entrypoints=web-secure"
- "traefik.http.services.gitea.loadbalancer.server.port=8080"
- "traefik.http.routers.gitea.tls.certresolver=${LETS_ENCRYPT_ENV}"
networks:
- proxy
- internal
2021-01-08 13:38:06 +00:00
mail:
2021-01-08 12:45:22 +00:00
image: "decentral1se/alerta:8.3.3"
command: alerta-mailer
2021-01-08 13:08:18 +00:00
configs: *default-configs
2021-01-08 12:45:22 +00:00
environment: *default-env
2021-01-08 13:08:18 +00:00
secrets: *default-secrets
2021-01-08 12:45:22 +00:00
networks:
- internal
db:
2021-01-08 14:32:45 +00:00
image: "mongo:4.4.3-bionic"
2021-01-08 14:41:16 +00:00
command: |
--authenticationDatabase=admin
2021-01-08 12:45:22 +00:00
secrets:
- db_root_password
volumes:
- "db:/data/db"
environment:
2021-01-08 14:11:17 +00:00
- MONGO_INITDB_DATABASE=alerta
- MONGO_INITDB_ROOT_USERNAME=alerta
2021-01-08 14:28:20 +00:00
- MONGO_INITDB_ROOT_PASSWORD_FILE=/run/secrets/db_root_password
2021-01-08 12:45:22 +00:00
networks:
- internal
networks:
internal:
proxy:
external: true
volumes:
db:
configs:
config_json:
name: ${STACK_NAME}_config_json_${CONFIG_JSON_VERSION}
2021-01-08 13:35:41 +00:00
file: config.json
2021-01-08 12:45:22 +00:00
alertad_conf:
name: ${STACK_NAME}_alertad_conf_${ALERTAD_CONF_VERSION}
file: alertad.conf.tmpl
template_driver: golang
alerta_conf:
name: ${STACK_NAME}_alerta_conf_${ALERTA_CONF_VERSION}
file: alerta.conf.tmpl
template_driver: golang
email_tmpl:
name: ${STACK_NAME}_email_tmpl_${EMAIL_TMPL_VERSION}
file: email.tmpl
secrets:
db_root_password:
name: ${STACK_NAME}_db_root_password_${SECRET_DB_ROOT_PASSWORD_VERSION}
external: true
cli_api_key:
name: ${STACK_NAME}_cli_api_key_${SECRET_CLI_API_KEY_VERSION}
external: true
mailer_api_key:
name: ${STACK_NAME}_mailer_api_key_${SECRET_MAILER_API_KEY_VERSION}
external: true
smtp_password:
name: ${STACK_NAME}_smtp_password_${SECRET_SMTP_PASSWORD_VERSION}
external: true
secret_key:
name: ${STACK_NAME}_secret_key_${SECRET_SECRET_KEY_VERSION}
external: true
oauth_client_secret:
name: ${STACK_NAME}_oauth_client_secret_${SECRET_OAUTH_CLIENT_SECRET_VERSION}
external: true
rocket_chat_webhook_url:
name: ${STACK_NAME}_rocket_chat_webhook_url_${SECRET_ROCKET_CHAT_WEBHOOK_URL}
external: true