This application is used for COVID-19 tests. Test subjects can register their test sample and receive the results of the sample.
- Django (Webapplication Framework)
- django-rest-framework (REST Framework)
- Gunicorn (Python WSGI HTTP Server)
- Semantic UI (UI Framework)
- PostgreSQL (Database)
Use the package manager pip to install the prerequisites from the
src/requirements.txt
file. Using Virtualenv is recommended. See Virtual Environment.
$ pip install -r requirements.txt
Create a .env
file containing the environment variables in
the root directory. You can copy the example.env
(make sure you update the secret key):
$ cp example.env .env
In order for permissions to work, add following groups at the admin dashboard. (A superuser does not need to be part of a group as he/she is allowed to do everything)
- Group - name = "lab_user" (User can do everythin within lab interface)
- Group - name = "bag_handler" (User can only control the bag handout)
For testing the application can be started with the command python manage.py runserver
:
$ cd covidtest
$ python manage.py runserver
System check identified no issues (0 silenced).
November 02, 2020 - 00:01:23
Django version 3.1.2, using settings 'covidtest.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
For deployment use a appropiate webserver (e.g. Gunicorn).
This application can be started in Docker-Containers. A setup with Docker, Gunicorn, Nginx and Postgres can be composed with the docker-compose.yml configuration.
$ sudo docker-compose up
Starting backend_postgres ... done
Starting covidtest_app ... done
Starting covidtest_nginx ... done
Attaching to covidtest_postgres, covidtest_app, covidtest_nginx