Try to wire up the mailer
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Luke Murphy 2020-04-09 19:06:09 +02:00
parent aca1ae7395
commit 80edffde42
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
5 changed files with 50 additions and 19 deletions

View File

@ -2,4 +2,6 @@ FROM alerta/alerta-web:7.4.5
EXPOSE 8080
RUN /venv/bin/pip install git+https://github.com/alerta/alerta-contrib.git#subdirectory=integrations/mailer
COPY . ${WORKDIR}

View File

@ -0,0 +1,18 @@
[DEFAULT]
sslverify = no
output = psql
endpoint = http://localhost:8080/api
timezone = Europe/London
[alerta-mailer]
key = "{{ alerta_mailer_api_key }}"
mail_to = "{{ mail_to }}"
mail_from = "{{ mail_from }}"
amqp_url = redis://localhost:6379/
dashboard_url = http://localhost:8000
smtp_username = "{{ smtp_username }}"
smtp_password = "{{ smtp_passwd }}"
smtp_use_ssl = False
debug = True
skip_mta = False
email_type = text

View File

@ -1,4 +1,4 @@
SITE_LOGO_URL = 'https://www.coops.tech/images/coops/autonomic'
SITE_LOGO_URL = "https://www.coops.tech/images/coops/autonomic"
DEBUG = True
@ -34,33 +34,33 @@ OAUTH2_CLIENT_ID = "{{ oauth_client_id }}"
OAUTH2_CLIENT_SECRET = "{{ oauth_client_secret }}"
SEVERITY_MAP = {
'fatal': 0,
'critical': 1,
'major': 2,
'minor': 3,
'warning': 4,
'indeterminate': 5,
'cleared': 5,
'normal': 5,
'ok': 5,
'informational': 6,
'debug': 7,
'trace': 8,
'unknown': 9
"fatal": 0,
"critical": 1,
"major": 2,
"minor": 3,
"warning": 4,
"indeterminate": 5,
"cleared": 5,
"normal": 5,
"ok": 5,
"informational": 6,
"debug": 7,
"trace": 8,
"unknown": 9
}
DEFAULT_NORMAL_SEVERITY = 'normal' # 'normal', 'ok', 'cleared'
DEFAULT_PREVIOUS_SEVERITY = 'indeterminate'
DEFAULT_NORMAL_SEVERITY = "normal"
DEFAULT_PREVIOUS_SEVERITY = "indeterminate"
PLUGINS = ['reject', 'blackout', 'normalise']
PLUGINS = ["reject", "blackout", "normalise"]
DATABASE_URL = "postgres://{{ db_user }}:{{ db_passwd }}@{{ db_loc }}/{{ db_name }}"
DATABASE_NAME = "{{ db_name }}"
EMAIL_VERIFICATION = False
MAIL_FROM = "alerta-noreply@autonomic.zone"
MAIL_FROM = "{{ mail_from }}"
SMTP_HOST = "mail.gandi.net"
SMTP_PASSWORD = "{{ smtp_passwd }}"
SMTP_PORT = "587"
SMTP_STARTTLS = True
SMTP_USERNAME = 'alerta-noreply'
SMTP_USERNAME = "alerta-noreply"

View File

@ -0,0 +1,9 @@
---
alerta_mailer_api_key: !vault |
$ANSIBLE_VAULT;1.1;AES256
66336232393337663930393532343664303330643162663065396662336534633232663534633666
6537373864323561666435326362303162613163643466350a303762386339323861353837376466
37353637346330353539623862366339613939303135333437336663393335363862303737376635
6530333732333131390a373765646333363137663363633235303764323030396534636630633832
37623530643038353731633065653138653665623933396639623334323535346437623737626464
6435336563366634343264373531323561333135343362386331

View File

@ -7,3 +7,5 @@ http_port: "8080"
keycloak_realm: "autonomic"
keycloak_role: "worker-owner"
keycloak_url: "https://id.autonomic.zone"
mail_from: "alerta-noreply@autonomic.zon"
mail_to: "kaboom@autonomic.zone"