diff --git a/docs/docker-compose-traefik-v1.yml b/docs/docker-compose-traefik-v1.yml index ed64bd3..c2ccaed 100644 --- a/docs/docker-compose-traefik-v1.yml +++ b/docs/docker-compose-traefik-v1.yml @@ -32,8 +32,15 @@ services: || ! [ `jq ".Certificates | length" /data/acme.json` != 0 ]; do sleep 1 ; done - && traefik-certs-dumper file --watch - --source /data/acme.json --dest /data/certs' + ; if ! id -u traefik > /dev/null 2>&1; then + addgroup --gid ${PGID} traefik + ; adduser --disabled-password --gecos "" --ingroup traefik --uid ${PUID} traefik + ; else + groupmod -g ${PGID} -o traefik + ; usermod -u ${PUID} -o traefik + ; fi + ; su - traefik -c "traefik-certs-dumper file --watch + --source /data/acme.json --dest /data/certs"' volumes: - ./letsencrypt:/data