File tree Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 1
1
FROM jfahrer/nginx:latest
2
2
3
- COPY proxy.conf /etc/nginx/sites-available/default
3
+ RUN apt-get update && apt-get install gettext-base
4
+
5
+ ENV PROXY_PROTOCOL=http PROXY_UPSTREAM=example.com
6
+
7
+ COPY proxy.conf /etc/nginx/sites-available/default.template
8
+ COPY start.sh /
9
+
10
+ CMD ["/start.sh" ]
Original file line number Diff line number Diff line change 3
3
4
4
resolver 127.0.0.11;
5
5
6
- set $protocol http ;
7
- set $upstream example.com ;
6
+ set $protocol $PROXY_PROTOCOL ;
7
+ set $upstream $PROXY_UPSTREAM ;
8
8
9
9
location / {
10
10
proxy_pass $protocol://$upstream$request_uri;
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ envsubst ' $PROXY_PROTOCOL,$PROXY_UPSTREAM' < /etc/nginx/sites-available/default.template > /etc/nginx/sites-available/default
4
+ nginx -g ' daemon off;'
You can’t perform that action at this time.
0 commit comments