forked from mirrors/fancyindex
add conditional to allow nginxauth to be commented out
This commit is contained in:
parent
200549d8c9
commit
79aea988f2
2 changed files with 5 additions and 3 deletions
|
@ -2,7 +2,8 @@ FROM nginx:1.15
|
|||
LABEL maintainer "fraoustin@gmail.com"
|
||||
|
||||
ENV SET_CONTAINER_TIMEZONE false
|
||||
ENV CONTAINER_TIMEZONE ""
|
||||
ENV CONTAINER_TIMEZONE ""
|
||||
ENV DISABLE_AUTH true
|
||||
|
||||
# manage user www-data
|
||||
RUN usermod -u 1000 www-data
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ ! -z "$WEBUSER" ]; then
|
||||
if [ "$DISABLE_AUTH" == true ]; then
|
||||
sed -i '' '/auth_basic/s/^/#/' /etc/nginx/conf.d/default.conf
|
||||
elif [ ! -z "$WEBUSER" ]; then
|
||||
addauth $WEBUSER $WEBPASSWORD
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue