Skip to content

Commit

Permalink
Nginx container edits for #169
Browse files Browse the repository at this point in the history
  • Loading branch information
piercema committed Mar 30, 2023
1 parent 08727f2 commit a512492
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 21 deletions.
20 changes: 10 additions & 10 deletions docker-compose-standalone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ services:
- ./nginx/ca-trust:/var/local/ca-trust:ro
- ./htadmin/config.ini:/var/www/htadmin/config/config.ini:rw
- ./htadmin/metadata:/var/www/htadmin/config/metadata:rw
- ./nginx/htpasswd:/var/www/htadmin/config/htpasswd:rw
- ./nginx/htpasswd:/var/www/htadmin/config/auth/htpasswd:rw
healthcheck:
test: ["CMD", "curl", "--silent", "--fail", "http://localhost"]
interval: 60s
Expand Down Expand Up @@ -639,7 +639,7 @@ services:
- ./nginx/ca-trust:/var/local/ca-trust:ro
- nginx-log-path:/var/log/nginx:rw
- ./nginx/nginx_ldap.conf:/etc/nginx/nginx_ldap.conf:ro
- ./nginx/htpasswd:/etc/nginx/htpasswd:ro
- ./nginx/htpasswd:/etc/nginx/auth/htpasswd:ro
- ./nginx/certs:/etc/nginx/certs:ro
- ./nginx/certs/dhparam.pem:/etc/nginx/dhparam/dhparam.pem:ro
healthcheck:
Expand All @@ -649,15 +649,15 @@ services:
retries: 3
start_period: 120s
labels:
traefik.enable: "false"
# traefik.http.routers.osmalcolm.rule: 'Host(`opensearch.malcolm.example.org`)'
# traefik.http.routers.osmalcolm.entrypoints: 'websecure'
# traefik.http.routers.osmalcolm.tls.certresolver: 'myresolver'
traefik.enable: 'false'
# traefik.http.routers.osmalcolm.rule: 'Host(``)'
# traefik.http.routers.osmalcolm.entrypoints: ''
# traefik.http.routers.osmalcolm.tls.certresolver: ''
# traefik.http.routers.osmalcolm.service: 'osmalcolm'
# traefik.http.services.osmalcolm.loadbalancer.server.port: '9200'
# traefik.http.routers.malcolm.rule: 'Host(`malcolm.example.org`)'
# traefik.http.routers.malcolm.entrypoints: 'websecure'
# traefik.http.routers.malcolm.tls.certresolver: 'myresolver'
# traefik.http.routers.malcolm.rule: 'Host(``)'
# traefik.http.routers.malcolm.entrypoints: ''
# traefik.http.routers.malcolm.tls.certresolver: ''
# traefik.http.routers.malcolm.service: 'malcolm'
# traefik.http.services.malcolm.loadbalancer.server.port: '443'

Expand All @@ -667,4 +667,4 @@ volumes:

networks:
default:
external: false
external: false
20 changes: 10 additions & 10 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ services:
- ./nginx/ca-trust:/var/local/ca-trust:ro
- ./htadmin/config.ini:/var/www/htadmin/config/config.ini:rw
- ./htadmin/metadata:/var/www/htadmin/config/metadata:rw
- ./nginx/htpasswd:/var/www/htadmin/config/htpasswd:rw
- ./nginx/htpasswd:/var/www/htadmin/config/auth/htpasswd:rw
healthcheck:
test: ["CMD", "curl", "--silent", "--fail", "http://localhost"]
interval: 60s
Expand Down Expand Up @@ -715,7 +715,7 @@ services:
- ./nginx/ca-trust:/var/local/ca-trust:ro
- nginx-log-path:/var/log/nginx:rw
- ./nginx/nginx_ldap.conf:/etc/nginx/nginx_ldap.conf:ro
- ./nginx/htpasswd:/etc/nginx/htpasswd:ro
- ./nginx/htpasswd:/etc/nginx/auth/htpasswd:ro
- ./nginx/certs:/etc/nginx/certs:ro
- ./nginx/certs/dhparam.pem:/etc/nginx/dhparam/dhparam.pem:ro
healthcheck:
Expand All @@ -725,15 +725,15 @@ services:
retries: 3
start_period: 120s
labels:
traefik.enable: "false"
# traefik.http.routers.osmalcolm.rule: 'Host(`opensearch.malcolm.example.org`)'
# traefik.http.routers.osmalcolm.entrypoints: 'websecure'
# traefik.http.routers.osmalcolm.tls.certresolver: 'myresolver'
traefik.enable: 'false'
# traefik.http.routers.osmalcolm.rule: 'Host(``)'
# traefik.http.routers.osmalcolm.entrypoints: ''
# traefik.http.routers.osmalcolm.tls.certresolver: ''
# traefik.http.routers.osmalcolm.service: 'osmalcolm'
# traefik.http.services.osmalcolm.loadbalancer.server.port: '9200'
# traefik.http.routers.malcolm.rule: 'Host(`malcolm.example.org`)'
# traefik.http.routers.malcolm.entrypoints: 'websecure'
# traefik.http.routers.malcolm.tls.certresolver: 'myresolver'
# traefik.http.routers.malcolm.rule: 'Host(``)'
# traefik.http.routers.malcolm.entrypoints: ''
# traefik.http.routers.malcolm.tls.certresolver: ''
# traefik.http.routers.malcolm.service: 'malcolm'
# traefik.http.services.malcolm.loadbalancer.server.port: '443'

Expand All @@ -743,4 +743,4 @@ volumes:

networks:
default:
external: false
external: false
2 changes: 1 addition & 1 deletion nginx/nginx_auth_basic.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
auth_basic "Authentication Required";
auth_basic_user_file /etc/nginx/htpasswd;
auth_basic_user_file /etc/nginx/auth/htpasswd;
set $authenticated_user $remote_user;
3 changes: 3 additions & 0 deletions nginx/scripts/docker_entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -237,5 +237,8 @@ EOF

fi # basic vs. ldap

if [![-f /etc/nginx/auth/]] ; then
cp /etc/nginx/auth/default/htpasswd /etc/nginx/auth/

# start supervisor (which will spawn nginx, stunnel, etc.) or whatever the default command is
exec "$@"

0 comments on commit a512492

Please sign in to comment.