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

127 lines
3.5 KiB
YAML

version: "3.8"
x-configs: &default-configs
- 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
x-secrets: &default-secrets
- cli_api_key
- mailer_api_key
- oauth_client_secret
- rocket_chat_webhook_url
- secret_key
- smtp_password
x-environment: &default-env
- ADMIN_USERS=${ADMIN_USERS}
- DB_HOST=db:27017
- DB_NAME=alerta
- DEBUG=${DEBUG}
- DOMAIN=${DOMAIN}
- KEYCLOAK_REALM=${KEYCLOAK_REALM}
- KEYCLOAK_ROLE=${KEYCLOAK_ROLE}
- KEYCLOAK_URL=${KEYCLOAK_URL}
- MAIL_FROM=${MAIL_FROM}
- MAIL_TO=${MAIL_TO}
- OAUTH2_CLIENT_ID=${OAUTH2_CLIENT_ID}
- QUEUE_HOST=queue:6379
- 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}
services:
app:
image: "decentral1se/alerta:8.5.0"
configs: *default-configs
environment: *default-env
secrets: *default-secrets
deploy:
update_config:
failure_action: rollback
order: start-first
labels:
- "traefik.enable=true"
- "traefik.http.routers.alerta.rule=Host(`${DOMAIN}`)"
- "traefik.http.routers.alerta.entrypoints=web-secure"
- "traefik.http.services.alerta.loadbalancer.server.port=8080"
- "traefik.http.routers.alerta.tls.certresolver=${LETS_ENCRYPT_ENV}"
- coop-cloud.${STACK_NAME}.app.version=8.5.0-d1a9a145
networks:
- proxy
- internal
mail:
image: "decentral1se/alerta:8.5.0"
command: alerta-mailer
configs: *default-configs
environment: *default-env
secrets: *default-secrets
networks:
- internal
deploy:
labels:
- coop-cloud.${STACK_NAME}.mail.version=8.5.0-d1a9a145
db:
image: "mongo:3-xenial"
volumes:
- "mongodb:/data/db"
networks:
- internal
deploy:
labels:
- coop-cloud.${STACK_NAME}.db.version=3-xenial-2ae2185d
queue:
image: "redis:6"
volumes:
- "redis:/data"
networks:
- internal
deploy:
labels:
- coop-cloud.${STACK_NAME}.queue.version=6-e10f55f9
networks:
internal:
proxy:
external: true
volumes:
mongodb:
redis:
configs:
config_json:
name: ${STACK_NAME}_config_json_${CONFIG_JSON_VERSION}
file: config.json
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:
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