File tree Expand file tree Collapse file tree 4 files changed +36
-2
lines changed Expand file tree Collapse file tree 4 files changed +36
-2
lines changed Original file line number Diff line number Diff line change
1
+ FROM nginx:1.15-alpine
2
+
3
+ COPY default.conf.tmpl /etc/nginx/default.conf.tmpl
4
+ ADD https://raw.githubusercontent.com/nginx/nginx/master/conf/uwsgi_params /etc/nginx/uwsgi_params
5
+
6
+ ENV LISTEN_PORT=8000
7
+ ENV APP_HOST=app
8
+ ENV APP_PORT=8000
9
+
10
+ RUN mkdir -p /vol/static
11
+ RUN adduser -D user
12
+ RUN chmod 755 /vol/static
13
+ RUN chown -R user:user /vol/static
14
+
15
+ COPY ./entrypoint.sh /entrypoint.sh
16
+ RUN chmod +x /entrypoint.sh
17
+
18
+ CMD ["/entrypoint.sh" ]
Original file line number Diff line number Diff line change 1
- # nginx-uwsgi-proxy
2
- NGINX container to use as a proxy for an uWSGI app
1
+ # NGINX Django uWSGI Proxy
2
+
3
+ NGINX container designed to forward requests to a Django app running on uWSGI.
Original file line number Diff line number Diff line change
1
+ server {
2
+ listen ${LISTEN_PORT};
3
+
4
+ location /static {
5
+ alias /vol/static;
6
+ }
7
+
8
+ location / {
9
+ uwsgi_pass ${APP_HOST}:${APP_PORT};
10
+ include /etc/nginx/uwsgi_params;
11
+ }
12
+ }
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ envsubst < /etc/nginx/default.conf.tmpl > /etc/nginx/conf.d/default.conf
3
+ nginx -g ' daemon off;'
You can’t perform that action at this time.
0 commit comments