Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
FROM nginx:alpine

ENV HTPASSWD='foo:$apr1$odHl5EJN$KbxMfo86Qdve2FH4owePn.' \
FORWARD_PORT=80
FORWARD_PORT=80 \
FORWARD_HOST=web

WORKDIR /opt

Expand Down
6 changes: 3 additions & 3 deletions auth.conf
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
server {
listen 80 default_server;

location / {
auth_basic "Restricted";
auth_basic_user_file auth.htpasswd;

proxy_pass http://web:${FORWARD_PORT};
proxy_pass http://${FORWARD_HOST}:${FORWARD_PORT};
proxy_read_timeout 900;
}
}
}
1 change: 1 addition & 0 deletions launch.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/sh

rm /etc/nginx/conf.d/default.conf || :
envsubst < auth.conf > /etc/nginx/conf.d/auth.conf
envsubst < auth.htpasswd > /etc/nginx/auth.htpasswd

Expand Down