summaryrefslogtreecommitdiff
path: root/conf
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2019-08-08 10:43:01 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2019-08-08 10:43:01 +0200
commit3556c80167b21e36476dd0a56ded6e8c4fc0020c (patch)
tree6520ff0de7d35d7d0ee4bddad3bea040140cf09d /conf
parent838fd71728067d34a490f4a6fcaa3a09a460ef0a (diff)
downloadComm-on-net-3556c80167b21e36476dd0a56ded6e8c4fc0020c.tar.bz2
Comm-on-net-3556c80167b21e36476dd0a56ded6e8c4fc0020c.zip
Install templates
Diffstat (limited to 'conf')
-rw-r--r--conf/nginx.conf.template35
-rw-r--r--conf/uwsgi.ini.template17
2 files changed, 52 insertions, 0 deletions
diff --git a/conf/nginx.conf.template b/conf/nginx.conf.template
new file mode 100644
index 0000000..703699f
--- /dev/null
+++ b/conf/nginx.conf.template
@@ -0,0 +1,35 @@
+server {
+ listen 80;
+ server_name #URL#;
+ root /srv/commonnet/; # install path
+ access_log /var/log/django/commonnet-access.log;
+ error_log /var/log/django/commonnet-error.log;
+
+ gzip on;
+ gzip_disable "msie6";
+ gzip_comp_level 6;
+ gzip_min_length 1100;
+ gzip_buffers 16 8k;
+ gzip_proxied any;
+ gzip_types text/plain text/css text/js text/xml text/javascript application/javascript application/x-javascript application/json application/xml application/rss+xml image/svg+xml;
+
+ client_max_body_size 200M;
+
+ location /static/ { # STATIC_URL
+ alias /srv/commonnet/collected_static/; # STATIC_ROOT
+ expires 30d;
+ }
+
+ location /media/ { # MEDIA_URL
+ alias /srv/commonnet/media/; # MEDIA_ROOT
+ expires 30d;
+ }
+
+ location / {
+ include uwsgi_params;
+ uwsgi_pass unix:/var/lib/uwsgi/run/commonnet.sock;
+ uwsgi_read_timeout 1800;
+ uwsgi_send_timeout 600;
+ }
+}
+
diff --git a/conf/uwsgi.ini.template b/conf/uwsgi.ini.template
new file mode 100644
index 0000000..089c952
--- /dev/null
+++ b/conf/uwsgi.ini.template
@@ -0,0 +1,17 @@
+[uwsgi]
+# variables
+projectname = commonnet
+projectdomain = #URL# # ex: commonnet.myorganization.net
+base = /srv/commonnet/ # install path
+
+# config
+plugins = python
+master = true
+protocol = uwsgi
+env = DJANGO_SETTINGS_MODULE=%(projectname).settings
+pythonpath = %(base)
+module = %(projectname).wsgi
+socket = /var/lib/uwsgi/run/%(projectname).sock
+logto = /var/log/django/uwsgi-%(projectname).log
+daemonize = /var/log/uwsgi/uwsgi-%(projectname).log
+buffer-size=65535