Allow installing an instance of the producers platform through Docker #5258
Labels
dev
Everything regarding the process of development
👩💻 DevOps
🐋 Docker
https://docker-curriculum.com/
✨ Feature
Features or enhancements to Open Food Facts server
Fixed ?
This issue might have been fixed. We can close them once we verify that they have.
🏭 Producers Platform
https://wiki.openfoodfacts.org/Platform_for_producers
In production, we have 2 instances of Product Opener running:
The code is the same, but the producers platform has a few differences:
server constants
$server_domain = "pro.openfoodfacts.org";
server paths
$www_root = "/srv/off-pro/html";
$data_root = "/srv/off-pro";
$mongodb = "off-pro";
[..]
%server_options = (
There are a few differences in directory structure:
the products and html/products directories have one extra level for the owner (e.g. org-nestle-france) of the products
In addition, there are also 2 minion server queues that are running, one for the producers platform (e.g. to import Excel file from producers, and to export data to the public platform), and one for the public platform (to import data from the producers platform).
The minion servers are run with systemctl:
root@off1:/srv/off-pro/products# cat /etc/systemd/system/minion-off-pro.service
[Unit]
Description=off-pro minion workers
After=postgresql.service
[Service]
Type=simple
#ExecStart=/srv/off-pro/scripts/minion.off-pro.sh
User=off
WorkingDirectory=/srv/off-pro/scripts
Environment="PERL5LIB=."
ExecStart=/srv/off-pro/scripts/minion_producers.pl minion worker -m production -q pro.openfoodfacts.org
KillMode=process
[Install]
WantedBy=multi-user.target
root@off1:/srv/off-pro/products#
root@off1:/srv/off-pro/products#
root@off1:/srv/off-pro/products# cat /etc/systemd/system/minion-off.service
[Unit]
Description=off minion workers
After=postgresql.service
[Service]
Type=simple
#ExecStart=/srv/off-pro/scripts/minion.off-pro.sh
User=off
WorkingDirectory=/srv/off/scripts
Environment="PERL5LIB=."
ExecStart=/srv/off/scripts/minion_producers.pl minion worker -m production -q openfoodfacts.org
KillMode=process
[Install]
WantedBy=multi-user.target
One issue may be memory: each instance of Product Opener takes a lot of memory, and the Minion processes also load the taxonomies.
The text was updated successfully, but these errors were encountered: