File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 1
1
FROM nginx:alpine
2
2
3
- ENV HTPASSWD='foo:$apr1$odHl5EJN$KbxMfo86Qdve2FH4owePn.' \
4
- FORWARD_PORT=80
3
+ ENV HTPASSWD='foo:$apr1$odHl5EJN$KbxMfo86Qdve2FH4owePn.'
4
+ ENV FORWARD_PORT=80
5
+ ENV TARGET_HOST=web
5
6
6
7
WORKDIR /opt
7
8
Original file line number Diff line number Diff line change 5
5
auth_basic "Restricted";
6
6
auth_basic_user_file auth.htpasswd;
7
7
8
- proxy_pass http://web :${FORWARD_PORT};
8
+ proxy_pass " http://${TARGET_HOST} :${FORWARD_PORT}" ;
9
9
proxy_read_timeout 900;
10
10
}
11
11
}
Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
3
- envsubst < auth.conf > /etc/nginx/conf.d/auth .conf
3
+ envsubst < auth.conf > /etc/nginx/conf.d/default .conf
4
4
envsubst < auth.htpasswd > /etc/nginx/auth.htpasswd
5
5
6
6
nginx -g " daemon off;"
You can’t perform that action at this time.
0 commit comments