Set default admin password

This commit is contained in:
Colin Hebert
2022-12-26 14:19:06 +01:00
parent 8867d5befc
commit 5a4fea851f
3 changed files with 13 additions and 1 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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