From 5a4fea851ff150a854256b181bfef72deadeec02 Mon Sep 17 00:00:00 2001 From: Colin Hebert Date: Mon, 26 Dec 2022 14:19:06 +0100 Subject: [PATCH] Set default admin password --- bootstrap.docker-compose.yml | 2 +- mounts/gotify/secrets/README.md | 4 ++++ notifications.docker-compose.yml | 8 ++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 mounts/gotify/secrets/README.md diff --git a/bootstrap.docker-compose.yml b/bootstrap.docker-compose.yml index 92d5abe..62cb813 100644 --- a/bootstrap.docker-compose.yml +++ b/bootstrap.docker-compose.yml @@ -35,7 +35,7 @@ services: command: > --host tcp://docker:2375 --hide-label nas-compose.boostrap=true - --admin-password-file /run/secrets/portainer_password + --admin-password-file /var/run/secrets/portainer_password networks: - docker - traefik diff --git a/mounts/gotify/secrets/README.md b/mounts/gotify/secrets/README.md new file mode 100644 index 0000000..c210491 --- /dev/null +++ b/mounts/gotify/secrets/README.md @@ -0,0 +1,4 @@ +Contains the file `admin_password` + +Envirnonment variable file for the default admin password, this is because gotify doesn't support docker secrets yet +https://github.com/gotify/server/issues/392 diff --git a/notifications.docker-compose.yml b/notifications.docker-compose.yml index 34b79bd..93e9a21 100644 --- a/notifications.docker-compose.yml +++ b/notifications.docker-compose.yml @@ -3,11 +3,15 @@ name: Notifications services: gotify: image: gotify/server + # Hack to get around the lack of secret support in Gotify + entrypoint: ['/bin/sh', '-c', 'GOTIFY_DEFAULTUSER_PASS=$(cat /run/secrets/admin_password) ./gotify-app'] networks: - gotify - traefik volumes: - gotify:/app/data + secrets: + - admin_password restart: unless-stopped labels: traefik.enable: true @@ -25,3 +29,7 @@ volumes: type: none o: bind device: ${MOUNT_DIR?}/gotify/data/ + +secrets: + admin_password: + file: ${MOUNT_DIR?}/gotify/secrets/admin_password \ No newline at end of file