Skip to content

Latest commit

 

History

History
25 lines (19 loc) · 1.46 KB

INSTALL.md

File metadata and controls

25 lines (19 loc) · 1.46 KB

Installation

Backend

To install the backend, add trovastelle.service as a systemd service.

  1. Install the Python requirements for Trovastelle with python -m pip install -r requirements.txt in the root folder of this repo.
  2. 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.
  3. Ensure that the paths in trovastelle.service and trovastelle.sh in the /src/celestial-compass/ folder match the path where this folder is.
  4. Copy trovastelle.service in the /src/celestial-compass/ folder to /etc/systemd/system.
  5. Run systemctl enable trovastelle
  6. Run systemctl start trovastelle

Frontend

To install the frontend:

  1. Copy trovastelle.wsgi in the ``/src/celestial-compass/folder to/var/www/wsgi-scripts`.
  2. Create a file trovastelle_web.log in /var/www/wsgi-scripts and ensure that it is owned by the pi user: cd /var/www/wsgi-scripts && sudo touch trovastelle_web.log && sudo chown pi trovastelle_web.log.
  3. Compile the frontend with npm run build in the frontend folder.
  4. Copy the frontend installation files in frontend/build to /var/www/frontend.
  5. Ensure that Apache and mod_wsgi are installed.
  6. Copy 020-wsgi-backend.conf to /etc/apache2/sites-available.
  7. Run sudo a2enmod 020-wsgi-backend.conf.
  8. Restart the Apache2 daemon with sudo systemctl reload apache2.