Compare commits

...

3 Commits

Author SHA1 Message Date
Lucas Verney 5daae2cc38
Merge pull request #14 from guix77/doc
Doc
2019-03-15 16:44:55 +01:00
Guillaume Duveau af7026a3d6 link to ZipAround 2019-03-14 22:34:27 +01:00
Guillaume Duveau b60179ab54 update doc following fresh install 2019-03-14 19:19:32 +01:00
3 changed files with 34 additions and 1 deletions

1
.gitignore vendored
View File

@ -14,3 +14,4 @@ data_rework/
.env
weboob
.htpasswd
.vscode

View File

@ -222,3 +222,9 @@ schema might change from time to time. Here is how to update it automatically:
* First, edit the `alembic.ini` file and ensure the `sqlalchemy.url` entry
points to the database URI you are actually using for Flatisfy.
* Then, run `alembic upgrade head` to run the required migrations.
## Misc
### Other tools more or less connected with Flatisfy
+ [ZipAround](https://github.com/guix77/ziparound) generates a list of ZIP codes centered on a city name, within a radius of N kilometers and within a certain travel time by car (France only)

View File

@ -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
```