Skip to content

Latest commit

 

History

History
48 lines (33 loc) · 1.15 KB

folksonomy.md

File metadata and controls

48 lines (33 loc) · 1.15 KB

Folksonomy API

Folksonomy is a service to allow contributors to freely add labels and values to products.

The code is at https://github.com/openfoodfacts/folksonomy_api/

Deployment

Folksonomy is deployed on a LXC container. (108 at the time of writing)

Code is in /home/folksonomy/folksonomy_api

It is started thanks to a systemd unit: folksonomy.service (config at /etc/systemd/system/folksonomy.service)

Server is running uvicorn on port 8000 with user folksonomy.

It is served behind the NGINX reverse proxy

Useful commands

Status (reload/restart/etc.):

systemctl status folksonomy

See service logs:

sudo journalctl -u folksonomy

Upgrade

Before every upgrade, make a snapshot of the Proxmox container. Then:

# Switch to "folksonomy" user
su folksonomy
# Upgrade from git repository
git pull
# Install new depencies if any
pip install -r requirements.txt
# DB migration process
yoyo apply --database postgresql:///folksonomy
# Finally, restart the service (with root user or root rights or sudo rights)
systemctl restart folksonomy