Test Website for playing around with, inspired by the Django Tutorial.
Test code. Do not use in production.
Instructions for running on a VM
- Spin up VM with port 80 exposed
- Copy these files onto the VM
- Use python virtual-env to use python3 if needs be
- Install nginx:
sudo apt install nginx-core
- Copy
nginx.conf
file to/etc/nginx/conf.d/nginx.conf
- Delete the competing file at:
/etc/nginx/sites-enabled/default
- Reload nginx:
nginx -s reload
The nginx setup means that Prometheus and Grafana can be accessed via port 80 on paths
/prometheus
and /grafana
respectively.
To set Prometheus and Grafana up you need to do the following:
- Install Prometheus and Grafana onto the VM
- Run Prometheus behind proxy by following: https://www.robustperception.io/external-urls-and-path-prefixes
- Run Grafana behind proxy by following: https://grafana.com/tutorials/run-grafana-behind-a-proxy/
Follow this guide to install / update the code as a webapp.
Note that Azure does not run migrate the db when it runs the app so you either need to migrate locally
and upload the sqllite database or run python manage.py migrate
in the webssh portal.