summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorjvoisin2019-02-23 13:27:33 +0100
committerjvoisin2019-02-23 13:27:33 +0100
commit1b0333fdd5175d6a45d1929218e0aac3db884139 (patch)
tree2438036e7c3c9159ecd80c06aa1d8fd336509819 /config
parent489fc7f2b5ef3d4be0f74e405a4200c6ffc12fc3 (diff)
Improve the deployment configuration
Diffstat (limited to 'config')
-rw-r--r--config/apache2.config6
-rw-r--r--config/nginx.config14
-rw-r--r--config/uwsgi.config19
3 files changed, 39 insertions, 0 deletions
diff --git a/config/apache2.config b/config/apache2.config
new file mode 100644
index 0000000..2489609
--- /dev/null
+++ b/config/apache2.config
@@ -0,0 +1,6 @@
1Listen 80
2<VirtualHost *:80>
3 DocumentRoot "/var/www/mat2-web/"
4
5 ProxyPass / unix:/var/www/mat2-web/mat2-web.sock|uwsgi://localhost/
6</VirtualHost>
diff --git a/config/nginx.config b/config/nginx.config
new file mode 100644
index 0000000..b519ee7
--- /dev/null
+++ b/config/nginx.config
@@ -0,0 +1,14 @@
1server {
2 server_name _;
3 listen 80 default_server;
4 listen [::]:80 default_server;
5 client_max_body_size 20M;
6
7 root /var/www/mat2-web;
8
9 location / { try_files $uri @yourapplication; }
10 location @yourapplication {
11 include uwsgi_params;
12 uwsgi_pass unix:/var/www/mat2-web/mat2-web.sock;
13 }
14}
diff --git a/config/uwsgi.config b/config/uwsgi.config
new file mode 100644
index 0000000..7108d33
--- /dev/null
+++ b/config/uwsgi.config
@@ -0,0 +1,19 @@
1[uwsgi]
2module=main
3chdir = /var/www/mat2-web/
4callable = app
5wsgi-file = main.py
6master = true
7workers = 1
8
9uid = www-data
10gid = www-data
11
12# kill stalled processes
13harakiri = 30
14die-on-term = true
15
16socket = mat2-web.sock
17chmod-socket = 774
18plugins = python3
19