The user may change the configured passwords and we need to update that file on startup.
Solution
On startup if nginx is enabled we need to generate the htpasswd file. This can be done by adding a script to the docker-templates/nginx/startup.sh path. The code is already configured to handle the case where the file already exists. Double check app.go to make sure thats the correct path.
Old bash script:
#!/bin/bash
# ==========================
# NGINX
# ==========================
if [[ $NGINX_ENABLED == "true" ]]; then
DOCKER_FILES=$DOCKER_FILES" -f docker-templates/nginx/docker-compose.yml"
data_dir_exists "nginx"
#Generate htpasswd
NGINX_PASSWORD="$(openssl passwd -1 $NGINX_PASSWORD)"
echo "$NGINX_USERNAME:$NGINX_PASSWORD" > $GLOBAL_ROOT/docker-data/nginx/.htpasswd
fi
Problem
The user may change the configured passwords and we need to update that file on startup.
Solution
On startup if nginx is enabled we need to generate the htpasswd file. This can be done by adding a script to the docker-templates/nginx/startup.sh path. The code is already configured to handle the case where the file already exists. Double check app.go to make sure thats the correct path.
Old bash script:
Steps to Reproduce the Problem