File tree Expand file tree Collapse file tree 3 files changed +4
-11
lines changed Expand file tree Collapse file tree 3 files changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -6,21 +6,17 @@ RUN apt-get update && \
6
6
DEBIAN_FRONTEND=noninteractive apt-get -yq install nginx && \
7
7
rm -rf /var/lib/apt/lists/*
8
8
9
- # Delete default configuration
9
+ # Replace configuration
10
10
RUN rm -v /etc/nginx/nginx.conf
11
11
ADD nginx.conf /etc/nginx/
12
12
13
- # Replace configuration
13
+ # Add run script
14
14
ADD run.sh /run.sh
15
15
RUN chmod 755 /*.sh
16
16
17
17
# Set reverse proxy domain
18
18
ENV REVERSE_DOMAIN example.com
19
19
20
- # Start Nginx
21
- # CMD sed -i "s/_REPLACE_ME_/$REVERSE_DOMAIN/g" /etc/nginx/nginx.conf && tail -F /var/log/nginx/* & /usr/sbin/nginx
22
- # CMD ["/etc/nginx/run.sh"]
23
-
24
20
# Expose and start
25
21
EXPOSE 80
26
22
CMD ["/run.sh" ]
Original file line number Diff line number Diff line change 14
14
15
15
location / {
16
16
proxy_pass http://_REPLACE_ME_/;
17
- proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
17
+ proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504 http_404 http_403 http_300 http_301 http_303 ;
18
18
proxy_redirect off ;
19
19
proxy_buffering off ;
20
20
proxy_set_header Host _REPLACE_ME_;
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
3
echo " Configuring Nginx Reverse Proxy..."
4
-
5
4
sed -i " s/_REPLACE_ME_/$REVERSE_DOMAIN /g" /etc/nginx/nginx.conf
6
5
7
6
echo " Starting Nginx Reverse Proxy..."
8
-
9
- tail -F /var/log/nginx/* &
10
- exec /usr/sbin/nginx
7
+ exec /usr/sbin/nginx & tail -F /var/log/nginx/*
You can’t perform that action at this time.
0 commit comments