summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md71
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
10This is an online version of [mat2](https://0xacab.org/jvoisin/mat2).
11Keep in mind that this is a beta version, don't rely on it for anything
12serious, yet.
13
14# How to deploy it?
15
16Since 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```
20Package: *
21Pin: release o=Debian,a=unstable
22Pin-Priority: 10
23```
24
25Then:
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
37Since 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]
42module=main
43chdir = /var/www/mat2-web/
44callable = app
45wsgi-file = main.py
46master = true
47workers = 1
48
49uid = www-data
50gid = www-data
51
52# kill stalled processes
53harakiri = 30
54die-on-term = true
55
56socket = mat2-web.sock
57chmod-socket = 774
58plugins = python3
59```
60
61and 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
71It should now be working.