Skip to content

Commit 8d3c10f

Browse files
committed
reconfiguring nginx
1 parent 29ca41f commit 8d3c10f

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ WORKDIR /
88
ENV PYTHONDONTWRITEBYTECODE 1
99
ENV PYTHONUNBUFFERED 1
1010

11+
# create a static directory for nginx
12+
ENV HOME=/
13+
ENV APP_HOME=/static
14+
RUN mkdir $APP_HOME
15+
RUN mkdir $APP_HOME/static
16+
WORKDIR $APP_HOME
17+
1118
# install dependencies
1219
RUN pip install --upgrade pip
1320
RUN pip install psycopg2

nginx/nginx.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
upstream pythondjango {
2-
server 174.138.52.28:8000;
2+
server web:8000;
33
}
44

55
server {
66

77
listen 80;
88

99
location / {
10-
proxy_pass http://pythondjango;
10+
proxy_pass http://174.138.52.28/;
1111
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
1212
proxy_set_header Host $host;
1313
proxy_redirect off;

0 commit comments

Comments
 (0)