From b60179ab54716f11367197010702a5e1cae3a111 Mon Sep 17 00:00:00 2001 From: Guillaume Duveau Date: Thu, 14 Mar 2019 19:19:32 +0100 Subject: [PATCH] update doc following fresh install --- doc/1.production.md | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/doc/1.production.md b/doc/1.production.md index 63eb48d..a4d20d5 100644 --- a/doc/1.production.md +++ b/doc/1.production.md @@ -42,13 +42,16 @@ python -m flatisfy build-data --config config/config.json -v python -m flatisfy import --config config/config.json -v ``` -_Note_: In the config, you should set `data_directory` to the absolute path of +_Note 1_: In the config, you should set `data_directory` to the absolute path of the `data` directory created below. This directory should be writable by the user running Flatisfy. You should also set `modules_path` to the absolute path to the `modules` folder under the previous `weboob` clone. Finally, the last `import` command can be `cron`-tasked to automatically fetch available housings posts periodically. +_Note 2_: As of 2019-03-13, building the webapp requires libpng-dev to be able to build pngquant-bin. On Debian Stretch (tested with Node v11.11.0): + + sudo apt install libpng-dev ## Use an alternative Bottle backend (production) @@ -221,3 +224,26 @@ setup. You should also set the `.htpasswd` file with users and credentials. _Note_: This vhost is really minimalistic and you should adapt it to your setup, enforce SSL ciphers for increased security and do such good practices things. + +### If database is in read only + +In the case of you have a "flatisfy" user, and another user runs the webserver, for instance "www-data", you should have problems with the webapp reading, but not writing, the database. Workaround (Debian): + +Add www-data in flatisfy group: + + sudo usermod -a -G flatisfy www-data + +Chmod data dir + DB file: + + sudo chmod 775 data + sudo chmod 664 data/flatisfy.db + +Edit /etc/uwsgi/apps-available/flatisfy.ini and add: + + chmod-socket = 664 + +Restart: + +```bash +systemctl restart uwsgi +``` \ No newline at end of file