Start from envelope Django template
This commit is contained in:
23
docker/nginx/conf.d/dev.conf
Normal file
23
docker/nginx/conf.d/dev.conf
Normal file
@@ -0,0 +1,23 @@
|
||||
upstream django {
|
||||
#server app:8000;
|
||||
#server unix:///var/run/socks/app.sock;
|
||||
server app:8000;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 9999;
|
||||
|
||||
location = /favicon.ico { access_log off; log_not_found off; }
|
||||
|
||||
location /static/ {
|
||||
root /conf;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_pass http://django;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $host;
|
||||
}
|
||||
|
||||
}
|
||||
24
docker/nginx/conf.d/uwsgi.conf
Normal file
24
docker/nginx/conf.d/uwsgi.conf
Normal file
@@ -0,0 +1,24 @@
|
||||
upstream django {
|
||||
server app:8000;
|
||||
#server unix:///var/run/socks/app.sock;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 9999;
|
||||
|
||||
location = /favicon.ico { access_log off; log_not_found off; }
|
||||
|
||||
location /static/ {
|
||||
root /conf;
|
||||
}
|
||||
|
||||
location / {
|
||||
include /etc/nginx/uwsgi_params; # the uwsgi_params file you installed
|
||||
uwsgi_pass django;
|
||||
uwsgi_param Host $host;
|
||||
uwsgi_param X-Real-IP $remote_addr;
|
||||
uwsgi_param X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
uwsgi_param X-Forwarded-Proto $http_x_forwarded_proto;
|
||||
}
|
||||
|
||||
}
|
||||
2
docker/redis.conf
Normal file
2
docker/redis.conf
Normal file
@@ -0,0 +1,2 @@
|
||||
unixsocket /var/run/socks/redis.sock
|
||||
unixsocketperm 777
|
||||
12
docker/uwsgi.ini
Normal file
12
docker/uwsgi.ini
Normal file
@@ -0,0 +1,12 @@
|
||||
[uwsgi]
|
||||
chdir=/code
|
||||
module=app.wsgi:application
|
||||
env=DJANGO_SETTINGS_MODULE=app.settings
|
||||
master=1
|
||||
pidfile=/tmp/project-master.pid
|
||||
socket=0.0.0.0:8000
|
||||
harakiri=20
|
||||
max-requests=100000
|
||||
vacuum=1
|
||||
home=/venv
|
||||
processes=12
|
||||
Reference in New Issue
Block a user