aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
blob: 2c743bb9e535ab6a9d0e35b17db1aef02f445823 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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;
        error_page 401 = @error_401;

        location @error_401 {
            return 302 https://id.horel.org/login?next=$schem://$http_host$request_uri;

        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/validate;
        }

    }

Uwsgi deploy
------------

* go to ``/home/http/famille``
* ``git pull``
* reload the uwsgi vassal: ``touch /etc/uwsgi/apps/famille.ini``
* make sure nothing is broken: ``systemctl status uwsgi@emperor`` 

TODO
----

* Gérer les fichiers pour pouvoir insérer des images 

Done
----
* display dates using timeago.js
* Email notifications
* Tirer les noms pour le Cadoscope
* Ajouter un bouton preview