diff --git a/changelog/unreleased/issue-119 b/changelog/unreleased/issue-119 new file mode 100644 index 0000000..8d9710a --- /dev/null +++ b/changelog/unreleased/issue-119 @@ -0,0 +1,8 @@ +Bugfix: Fix Docker configuration for DISABLE_AUTHENTICATION + +A regression was introduced which caused the DISABLE_AUTHENTICATION environment +variable to stop working in Docker configurations. This has been fix by +automatically setting the option `--no-auth` to disable authentication. + +https://github.com/restic/rest-server/issues/119 +https://github.com/restic/rest-server/pull/124 diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 300e488..583a838 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -2,7 +2,9 @@ set -e -if [ -z "$DISABLE_AUTHENTICATION" ]; then +if [ -n "$DISABLE_AUTHENTICATION" ]; then + OPTIONS="--no-auth $OPTIONS" +else if [ ! -f "$PASSWORD_FILE" ]; then touch "$PASSWORD_FILE" fi