add conditional to allow nginxauth to be commented out

This commit is contained in:
Josh Bentley 2019-05-03 10:39:30 +01:00
parent 200549d8c9
commit 79aea988f2
2 changed files with 5 additions and 3 deletions

View file

@ -3,6 +3,7 @@ LABEL maintainer "fraoustin@gmail.com"
ENV SET_CONTAINER_TIMEZONE false ENV SET_CONTAINER_TIMEZONE false
ENV CONTAINER_TIMEZONE "" ENV CONTAINER_TIMEZONE ""
ENV DISABLE_AUTH true
# manage user www-data # manage user www-data
RUN usermod -u 1000 www-data RUN usermod -u 1000 www-data

View file

@ -1,5 +1,6 @@
#!/bin/bash #!/bin/bash
if [ "$DISABLE_AUTH" == true ]; then
if [ ! -z "$WEBUSER" ]; then sed -i '' '/auth_basic/s/^/#/' /etc/nginx/conf.d/default.conf
elif [ ! -z "$WEBUSER" ]; then
addauth $WEBUSER $WEBPASSWORD addauth $WEBUSER $WEBPASSWORD
fi fi