Skip to content

Commit 62e5bd5

Browse files
committed
Make the hostname configurable
1 parent 648516b commit 62e5bd5

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
FROM nginx:alpine
22

33
ENV HTPASSWD='foo:$apr1$odHl5EJN$KbxMfo86Qdve2FH4owePn.' \
4-
FORWARD_PORT=80
4+
FORWARD_PORT=80 \
5+
FORWARD_HOST=web
56

67
WORKDIR /opt
78

auth.conf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
server {
22
listen 80 default_server;
3-
3+
44
location / {
55
auth_basic "Restricted";
66
auth_basic_user_file auth.htpasswd;
77

8-
proxy_pass http://web:${FORWARD_PORT};
8+
proxy_pass http://${FORWARD_HOST}:${FORWARD_PORT};
99
proxy_read_timeout 900;
1010
}
11-
}
11+
}

0 commit comments

Comments
 (0)