Open
Description
The documentation for the installation is misleading and confusing, mixing old venv/pip install and poetry.
This is a pitty, as the new poetry way of install works like a charm when you get to understand its logic.
I would suggest the following process :
As root, create the poetry2 environment for www-data :
cd /var/www
for dn in .cache .local misp-modules; do
sudo mkdir /var/www${dn}
sudo chown www-data:www-data /var/www/${dn}
done
Switch to www-data user with sudo -u www-data -s
Download Poetry2 and install it in www-data 's environment (don't use system-suplied poetry, likely outdated).
curl -sSL https://install.python-poetry.org | python3 -
export PATH="/var/www/.local/bin:$PATH"
poetry --version
Download misp-modules and install it :
cd /var/www
git clone https://github.com/MISP/misp-modules.git
poetry install -E all
Get path to poetry's venv :
poetry env info --path
Use the poetry venv path to create the systemd file in /etc/systemd/system/misp-modules.service
:
[Unit]
Description=System-wide instance of the MISP Modules
After=network.target
[Service]
User=www-data
Group=www-data
WorkingDirectory=/var/www/misp-modules
ExecStart=/var/www/.cache/pypoetry/virtualenvs/misp-modules-a47tzaLC-py3.12/bin/misp-modules -l 127.0.0.1
[Install]
WantedBy=multi-user.target
Metadata
Metadata
Assignees
Labels
No labels