nginx
This commit is contained in:
parent
6806c09856
commit
e91deac91f
@ -1,9 +1,9 @@
|
|||||||
FROM docker:dind
|
FROM docker:dind
|
||||||
|
|
||||||
RUN apk add --update --no-cache python3 && ln -sf python3 /usr/bin/python
|
RUN apk add --update python3 && ln -sf python3 /usr/bin/python
|
||||||
RUN python3 -m ensurepip
|
RUN python3 -m ensurepip
|
||||||
RUN apk update && apk add postgresql-dev gcc python3-dev musl-dev jpeg-dev zlib-dev libjpeg
|
RUN apk update && apk add postgresql-dev gcc python3-dev musl-dev jpeg-dev zlib-dev libjpeg
|
||||||
RUN pip3 install --no-cache --upgrade pip setuptools
|
RUN pip3 install --upgrade pip3 wheel setuptools
|
||||||
RUN addgroup -S docker
|
RUN addgroup -S docker
|
||||||
|
|
||||||
ENV PYTHONUNBUFFERED 1
|
ENV PYTHONUNBUFFERED 1
|
||||||
@ -14,5 +14,3 @@ WORKDIR /usr/src/app/
|
|||||||
COPY . /usr/src/app/
|
COPY . /usr/src/app/
|
||||||
|
|
||||||
RUN pip3 install -r requirements.txt
|
RUN pip3 install -r requirements.txt
|
||||||
|
|
||||||
EXPOSE 8000
|
|
||||||
|
23
nginx.conf
23
nginx.conf
@ -1,15 +1,16 @@
|
|||||||
events {
|
upstream app {
|
||||||
worker_connections 1024;
|
server 127.0.0.1:8000;
|
||||||
}
|
}
|
||||||
|
|
||||||
http {
|
server {
|
||||||
upstream app_server {
|
listen 80;
|
||||||
server localhost:8000 fail_timeout=0;
|
|
||||||
}
|
location / {
|
||||||
server {
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
listen 80;
|
proxy_set_header Host $http_host;
|
||||||
location / {
|
proxy_redirect off;
|
||||||
proxy_pass http://app_server;
|
|
||||||
}
|
proxy_pass http://app;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user