To install the backend, add trovastelle.service
as a systemd service.
- Install the Python requirements for Trovastelle with
python -m pip install -r requirements.txt
in the root folder of this repo. - Install the package with
python -m pip install -e .
in the root folder of this repo. Note that-e
symlinks the package to the current folder instead of copying, which is a good idea for development. - Ensure that the paths in
trovastelle.service
andtrovastelle.sh
in the/src/celestial-compass/
folder match the path where this folder is. - Copy
trovastelle.service
in the/src/celestial-compass/
folder to /etc/systemd/system
. - Run
systemctl enable trovastelle
- Run
systemctl start trovastelle
To install the frontend:
- Copy
trovastelle.wsgi
in the ``/src/celestial-compass/folder to
/var/www/wsgi-scripts`. - Create a file
trovastelle_web.log
in/var/www/wsgi-scripts
and ensure that it is owned by thepi
user:cd /var/www/wsgi-scripts && sudo touch trovastelle_web.log && sudo chown pi trovastelle_web.log
. - Compile the frontend with
npm run build
in thefrontend
folder. - Copy the frontend installation files in
frontend/build
to/var/www/frontend
. - Ensure that Apache and mod_wsgi are installed.
- Copy
020-wsgi-backend.conf
to/etc/apache2/sites-available
. - Run
sudo a2enmod 020-wsgi-backend.conf
. - Restart the Apache2 daemon with
sudo systemctl reload apache2
.