Backend for my gas tracker angular app, written with Django Rest Framework
- Clone the repository
- Install OS dependencies with
sudo apt-get install python3-dev default-libmysqlclient-dev build-essential
- create a virtual environment with Python 3.7
- install requirements with
pip install -r requirements.txt
- Create a
systemd
service file at/etc/systemd/system/gas-tracker-django.service
[Unit]
Description=Backend for my gastracker application
[Service]
ExecStart=/path/to/gas-tracker-django/runserver.sh
WorkingDirectory=/path/to/gas-tracker-django
[Install]
WantedBy=multi-user.target
- Start and enable the service
systemctl start gas-tracker-django
systemctl enable gas-tracker-django