aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThibaut Horel <thibaut@horel.org>2018-12-26 12:22:11 -0500
committerThibaut Horel <thibaut@horel.org>2018-12-26 12:22:11 -0500
commit5d1bd5378219693af84128a994e2adf3780e12b8 (patch)
treef3b4f12a449d5e5368b9842f4b241d55019d7daa
parentf4706933056cc791037a0209a19fcf4177cc2f69 (diff)
downloadfamille-flask-5d1bd5378219693af84128a994e2adf3780e12b8.tar.gz
Add nginx config
-rw-r--r--README.md40
1 files changed, 37 insertions, 3 deletions
diff --git a/README.md b/README.md
index 48ca661..d8c1e18 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,41 @@
-Réécriture du site de la famille en Flask.
-How to deploy?
---------------
+Nginx config
+------------
+
+ :::nginx
+ server {
+ server_name famille.horel.org;
+ listen 80;
+ try_files $uri @application;
+
+ location /static {
+ root /home/thibaut/code/famille-flask/;
+ }
+
+ location @application {
+ include uwsgi_params;
+ uwsgi_pass unix:/run/uwsgi/famille.sock;
+ uwsgi_param HTTP_X_REMOTE_USER $auth_user;
+ }
+
+ auth_request /validate;
+ auth_request_set $auth_user $upstream_http_x_remote_user;
+
+ location = /validate {
+ internal;
+ proxy_pass_request_body off;
+ proxy_set_header Content-Length "";
+ proxy_set_header Host $host;
+ proxy_set_header X-Original-URI $request_uri;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_pass http://127.0.0.1:8080/;
+ }
+
+ }
+
+Uwsgi deploy
+------------
* go to ``/home/http/famille``
* ``git pull``