File tree 5 files changed +55
-0
lines changed
5 files changed +55
-0
lines changed Original file line number Diff line number Diff line change
1
+ DEBUG = 0
2
+ SECRET_KEY = " seeeecret"
3
+ DJANGO_SETTINGS_MODULE = " qr_service.settings.production"
Original file line number Diff line number Diff line change
1
+ FROM python:3.7
2
+
3
+ RUN mkdir /app
4
+ WORKDIR /app
5
+
6
+ COPY requirements.txt ./
7
+ RUN pip install --no-cache-dir -r requirements.txt
8
+ COPY . .
Original file line number Diff line number Diff line change
1
+ version : ' 3'
2
+ services :
3
+ web :
4
+ build : .
5
+ container_name : qr_service
6
+ volumes :
7
+ - .:/app
8
+ expose :
9
+ - 8000
10
+ env_file :
11
+ - .env
12
+ command : bash -c "gunicorn --workers=3 qr_service.wsgi -b 0.0.0.0:8000"
13
+ nginx :
14
+ restart : always
15
+ build : ./nginx/
16
+ volumes :
17
+ - ./nginx/:/etc/nginx/conf.d
18
+ - ./logs/:/app/logs
19
+ ports :
20
+ - 1337:80
21
+ depends_on :
22
+ - web
23
+ links :
24
+ - web
Original file line number Diff line number Diff line change
1
+ FROM nginx
2
+
3
+ RUN rm /etc/nginx/conf.d/default.conf
4
+ COPY qr_service.conf /etc/nginx/conf.d
Original file line number Diff line number Diff line change
1
+ upstream qr_service {
2
+ server web:8000;
3
+ }
4
+
5
+ server {
6
+
7
+ listen 80;
8
+
9
+ location / {
10
+ proxy_pass http://qr_service;
11
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
12
+ proxy_set_header Host $host;
13
+ proxy_redirect off;
14
+ }
15
+
16
+ }
You can’t perform that action at this time.
0 commit comments