2020-11-24 21:17:54 +01:00
|
|
|
# FT Corona Tracker
|
2020-11-24 20:46:30 +01:00
|
|
|
|
2020-11-24 22:50:17 +01:00
|
|
|
Small webapp to track who was in which room at which time to backtrace potential viral infections.
|
2020-11-24 21:17:54 +01:00
|
|
|
|
2020-11-24 22:52:01 +01:00
|
|
|
**WORK IN PROGRESS** This project is still under heavy construction and not ready for use in production.
|
|
|
|
|
2020-11-24 22:50:17 +01:00
|
|
|
For Ideas and Progress see [Issues](https://git.fasttube.de/FaSTTUBe/ft-corona-tracker/issues).
|
|
|
|
|
2020-12-03 21:32:49 +01:00
|
|
|
## Requirements
|
|
|
|
|
|
|
|
- Unixoid system (linux, BSD, macOS). Windows might also work.
|
|
|
|
- `python` 3.6+ (might be `python3` on your system)
|
|
|
|
- `pip` for python 3+ (might be `pip3` on your system)
|
|
|
|
|
2020-11-30 17:18:39 +01:00
|
|
|
## How to run
|
|
|
|
|
|
|
|
(Dev setup, prod setup not finished yet)
|
|
|
|
|
|
|
|
```bash
|
|
|
|
# clone, cd into repo
|
2020-12-03 21:32:49 +01:00
|
|
|
pip install -e .
|
2020-11-30 17:18:39 +01:00
|
|
|
python3 -m ftracker
|
|
|
|
```
|
|
|
|
|
2020-12-03 21:32:49 +01:00
|
|
|
Edit `config.ini` to tune your installation.
|
|
|
|
|
2020-12-01 15:34:45 +01:00
|
|
|
Then, point your browser at <http://localhost:5000/?arrival=42>.
|
2020-11-30 17:18:39 +01:00
|
|
|
|
2020-12-03 21:32:49 +01:00
|
|
|
## Installation/Deployment
|
|
|
|
|
|
|
|
1. FTracker Backend
|
|
|
|
|
|
|
|
As above:
|
|
|
|
```bash
|
|
|
|
# clone, cd into repo
|
|
|
|
pip install . # Use -e if you want to hack on the backend while installed.
|
|
|
|
```
|
|
|
|
|
|
|
|
2. WSGI Server
|
|
|
|
|
|
|
|
You need a WSGI Middleware (using `Flask`'s included `werkzeug` is discouraged
|
|
|
|
for production environments.). I recommend `uwsgi` since it's flexible, fast
|
|
|
|
and has `nginx` integration. A sample configuration file as well as service
|
|
|
|
description files for both `systemd` and `rc` are included in `res/` which you
|
|
|
|
can adapt to your system (file paths etc.) (The `systemd` service file still
|
|
|
|
untested, feel free to leave feedback).
|
|
|
|
|
|
|
|
3. Webserver
|
|
|
|
|
|
|
|
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
|
|
|
|
you can adapt to your system (domain, SSL certs). The configuration should
|
|
|
|
include: 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
|
|
|
|
recommend using `let'sencrypt`'s `certbot` to easily obtain certificates.
|
|
|
|
|
|
|
|
4. Customization
|
|
|
|
|
|
|
|
Edit `config.ini` to your liking. Restart the backend by restarting the `uwsgi`
|
|
|
|
service, e.g. `sudo systemctl restart ftracker` or `sudo service ftracker
|
|
|
|
restart`
|
|
|
|
|
2020-11-30 17:18:39 +01:00
|
|
|
## License
|
|
|
|
|
2020-11-24 22:50:17 +01:00
|
|
|
Licensed under GNU GPL v3, see [LICENSE.md](https://git.fasttube.de/FaSTTUBe/ft-corona-tracker/src/branch/master/LICENSE.md) for details.
|
2020-11-24 22:41:26 +01:00
|
|
|
|
2020-11-30 17:18:39 +01:00
|
|
|
Copyright (C) 2020 Oskar/FaSTTUBe
|