diff options
| author | jvoisin | 2018-11-15 16:03:12 +0100 |
|---|---|---|
| committer | jvoisin | 2018-12-09 18:59:23 +0100 |
| commit | 3231047c1475c9e500a0e5f92ea129fccef8dd28 (patch) | |
| tree | 6aab8a78909887b36cdcfb089cf557a043f25875 /README.md | |
| parent | 60aa7f879e16e4ae329c099eecffd97547b39a07 (diff) | |
Second commit
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..79b9069 --- /dev/null +++ b/README.md | |||
| @@ -0,0 +1,71 @@ | |||
| 1 | ``` | ||
| 2 | _ ___ _ | ||
| 3 | | | |__ \ | | | ||
| 4 | _ __ ___ __ _| |_ ) |_______ _____| |__ Trashing your meta, | ||
| 5 | | '_ ` _ \ / _` | __| / /______\ \ /\ / / _ \ '_ \ keeping your data, | ||
| 6 | | | | | | | (_| | |_ / /_ \ V V / __/ |_) | within your browser. | ||
| 7 | |_| |_| |_|\__,_|\__|____| \_/\_/ \___|_.__/ | ||
| 8 | ``` | ||
| 9 | |||
| 10 | This is an online version of [mat2](https://0xacab.org/jvoisin/mat2). | ||
| 11 | Keep in mind that this is a beta version, don't rely on it for anything | ||
| 12 | serious, yet. | ||
| 13 | |||
| 14 | # How to deploy it? | ||
| 15 | |||
| 16 | Since mat2 isn't available in debian stable yet, you might want to add this to | ||
| 17 | /etc/apt/preferences.d/ to be able to install `mat2` via apt. | ||
| 18 | |||
| 19 | ``` | ||
| 20 | Package: * | ||
| 21 | Pin: release o=Debian,a=unstable | ||
| 22 | Pin-Priority: 10 | ||
| 23 | ``` | ||
| 24 | |||
| 25 | Then: | ||
| 26 | |||
| 27 | ``` | ||
| 28 | # apt install git nginx-light uwsgi uwsgi-plugin-python3 mat2 --no-install-recommends | ||
| 29 | # cd /var/www/ | ||
| 30 | # git clone https://0xacab.org/jvoisin/mat2-web.git | ||
| 31 | # mkdir ./mat2-web/uploads/ | ||
| 32 | # chown -R www-data:www-data ./mat2-web | ||
| 33 | # service uwsgi start | ||
| 34 | # service nginx start | ||
| 35 | ``` | ||
| 36 | |||
| 37 | Since uwsgi isn't fun to configure, feel free to slap this into your | ||
| 38 | `/etc/uwsgi/apps-enabled/mat2-web.ini`: | ||
| 39 | |||
| 40 | ``` | ||
| 41 | [uwsgi] | ||
| 42 | module=main | ||
| 43 | chdir = /var/www/mat2-web/ | ||
| 44 | callable = app | ||
| 45 | wsgi-file = main.py | ||
| 46 | master = true | ||
| 47 | workers = 1 | ||
| 48 | |||
| 49 | uid = www-data | ||
| 50 | gid = www-data | ||
| 51 | |||
| 52 | # kill stalled processes | ||
| 53 | harakiri = 30 | ||
| 54 | die-on-term = true | ||
| 55 | |||
| 56 | socket = mat2-web.sock | ||
| 57 | chmod-socket = 774 | ||
| 58 | plugins = python3 | ||
| 59 | ``` | ||
| 60 | |||
| 61 | and this into your `/etc/nginx/site-enabled/mat2-web`: | ||
| 62 | |||
| 63 | ``` | ||
| 64 | location / { try_files $uri @yourapplication; } | ||
| 65 | location @yourapplication { | ||
| 66 | include uwsgi_params; | ||
| 67 | uwsgi_pass unix:/var/www/mat2-web/mat2-web.sock; | ||
| 68 | } | ||
| 69 | ``` | ||
| 70 | |||
| 71 | It should now be working. | ||
