Pass secrets to containers as files instead of env variables
Related-Prod: PROD-34268
Change-Id: I8269e2c3f0402980df13430de213764a7e2f8949
diff --git a/docker/swarm/stack/monitoring/alerta.yml b/docker/swarm/stack/monitoring/alerta.yml
index acd4d70..ac16a2b 100644
--- a/docker/swarm/stack/monitoring/alerta.yml
+++ b/docker/swarm/stack/monitoring/alerta.yml
@@ -8,6 +8,7 @@
client:
stack:
monitoring:
+ version: '3.7'
service:
alerta:
networks:
@@ -27,6 +28,13 @@
- ${prometheus:alerta:config_dir}/alertad.conf:/app/alertad.conf
environment:
ADMIN_USERS: ${_param:alerta_admin_username}
- ADMIN_PASSWORD: ${_param:alerta_admin_password}
+ ADMIN_PASSWORD_FILE: "/run/secrets/alerta"
MONGO_URI: ${_param:alerta_mongodb_uri}
PLUGINS: ""
+ secrets:
+ - alerta
+ secrets:
+ alerta:
+ external: true
+ value: ${_param:alerta_admin_password}
+