Improve and clean up README

This commit is contained in:
Oskar Winkels 2020-12-05 16:21:21 +01:00
parent 02a07bf76a
commit 6aed013796
1 changed files with 18 additions and 21 deletions

View File

@ -1,13 +1,10 @@
# FT Corona Tracker # FaSTTUBe Corona Tracker
Small webapp to track who was in which room at which time to backtrace Small webapp to track who was in which room at which time to backtrace
potential viral infections. potential viral infections.
**WORK IN PROGRESS** This project is still under heavy construction and not For Ideas, Progress, and Bugs visit
ready for use in production. [Issues](https://git.fasttube.de/FaSTTUBe/ftracker/issues).
For Ideas and Progress see
[Issues](https://git.fasttube.de/FaSTTUBe/ft-corona-tracker/issues).
## Requirements ## Requirements
@ -17,7 +14,7 @@ For Ideas and Progress see
## How to run ## How to run
(Dev setup, prod setup not finished yet) (Dev setup, for prod deployment see below)
```bash ```bash
# clone, cd into repo # clone, cd into repo
@ -27,11 +24,11 @@ python3 -m ftracker
Edit `config.ini` to tune your installation. Edit `config.ini` to tune your installation.
Then, point your browser at <http://localhost:5000/?arrival=42>. Then, point your browser at <http://localhost:5000/>.
## Installation/Deployment ## Installation/Deployment
1. FTracker Backend ### 1. FTracker Backend
As above: As above:
```bash ```bash
@ -39,26 +36,26 @@ As above:
pip install . # Use -e if you want to hack on the backend while installed. pip install . # Use -e if you want to hack on the backend while installed.
``` ```
2. WSGI Server ### 2. WSGI Server + Service file
You need a WSGI Middleware (using `Flask`'s included `werkzeug` is discouraged You need a WSGI Middleware (using `Flask`'s included `werkzeug` is discouraged
for production environments.). I recommend `uwsgi` since it's flexible, fast for production environments). I recommend `uwsgi` since it's flexible, fast and
and has `nginx` integration. A sample configuration file as well as service has `nginx` integration. A sample configuration file as well as service
description files for both `systemd` and `rc` are included in `res/` which you description files for both `systemd` and `rc` are included in `res/` for you to
can adapt to your system (file paths etc.) (The `systemd` service file still adapt (file paths etc.) and install to your system (The `systemd` service file
untested, feel free to leave feedback). still untested though, feel free to leave feedback).
3. Webserver ### 3. Webserver
You need a webserver. I recommend `nginx` because it's the industry standard You need a webserver. I recommend `nginx` because it's the industry standard
and fast. A sample config file is included at `res/ftracker.nginx.conf` which and fast. A sample config file is included in `res/` for you to adapt (domain,
you can adapt to your system (domain, SSL certs). The configuration should SSL certs) and install to your system. The configuration should include:
include: Webroot in `web/` with a fallback to the WSGI handler for the backend. Webroot in `web/` with a fallback to the WSGI handler for the backend.
Enabling SSL (https) and redirecting http to https is strongly encouraged, i Enabling SSL (https) and redirecting http to https is strongly encouraged, i
recommend using `let'sencrypt`'s `certbot` to easily obtain certificates. recommend using `Let's Encrypt`'s `certbot` to easily obtain certificates.
4. Customization ### 4. Customization
Edit `config.ini` to your liking. Restart the backend by restarting the `uwsgi` Edit `config.ini` to your liking. Restart the backend by restarting the `uwsgi`
service, e.g. `sudo systemctl restart ftracker` or `sudo service ftracker service, e.g. `sudo systemctl restart ftracker` or `sudo service ftracker