fix: auth env vars shuffle

This commit is contained in:
decentral1se 2024-03-23 11:18:59 +01:00
parent 897bf69b8c
commit fd6857b7e4
Signed by: decentral1se
GPG Key ID: 03789458B3D0C410
3 changed files with 2 additions and 2 deletions

View File

@ -6,6 +6,7 @@ services:
environment:
- AUTH_ENABLED
- AUTH_USERNAME
- DOMAIN
configs:
- source: htpasswd_conf
target: /etc/nginx/.htpasswd

View File

@ -6,7 +6,6 @@ services:
image: nginx:1.25.3-alpine
environment:
- DOMAIN
- HTTP_BASIC_AUTH_ENABLED
configs:
- source: nginx_conf
target: /etc/nginx/conf.d/default.conf

View File

@ -9,7 +9,7 @@ server {
}
location /deploy {
{{ if eq (env "HTTP_BASIC_AUTH_ENABLED") "1" }}
{{ if eq (env "AUTH_ENABLED") "1" }}
auth_basic "Administrators Area";
auth_basic_user_file /etc/nginx/.htpasswd;
{{ end }}