Skip to content

Commit 3b76d8c

Browse files
authored
Merge pull request beevelop#2 from np/master
Make the hostname configurable and a bug fix
2 parents 648516b + e4eb534 commit 3b76d8c

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-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+
}

launch.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/bin/sh
22

3+
rm /etc/nginx/conf.d/default.conf || :
34
envsubst < auth.conf > /etc/nginx/conf.d/auth.conf
45
envsubst < auth.htpasswd > /etc/nginx/auth.htpasswd
56

0 commit comments

Comments
 (0)