1
0
Fork 0
mirror of https://codeberg.org/Mo8it/AdvLabDB.git synced 2024-11-08 21:21:06 +00:00
AdvLabDB/README.md

52 lines
3.5 KiB
Markdown
Raw Normal View History

2022-11-19 18:51:00 +00:00
# AdvLabDB
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
[![security: bandit](https://img.shields.io/badge/security-bandit-yellow.svg)](https://github.com/PyCQA/bandit)
## About
AdvLabDB is a database with a web interface for labs.
2023-01-30 14:59:23 +00:00
<!-- TODO: Screenshots -->
2022-11-19 18:51:00 +00:00
Admins have an interface to manage students, groups, experiments, appointments, marks and analyse data.
Assistants have a separate interface to set marks and schedule appointments with students.
2023-02-02 12:41:15 +00:00
## Getting Started
You can deploy AdvLabDB easily using Docker. Take a look at [`compose.yaml`](compose.yaml) as a starting point for usage with `docker compose`.
The container uses two volumes:
- One volume has to be mounted at `/volumes/data` in the container. This volume has to contain the two files `settings.ini` and `secrets.ini`:
- A template for `settings.ini` can be found at [`deploy/settings_template.ini`](deploy/settings_template.ini). This template will be automatically copied to the data volume as default settings file if a settings file does not already exist.
- The file `secrets.ini` will be generated automatically after the first start of the container if it does not exist.
- The second volume has to be mounted at `/volumes/logs` to store logs.
After configuring a compose file, run the command `sudo docker compose run advlabdb manage.py setup init-db` to initialize the database with a guide.
After the database initialization, run `sudo docker compose up -d` to start the container.
### All inclusive
2022-11-19 18:51:00 +00:00
2023-02-02 12:41:15 +00:00
If you don't want to use your own reverse proxy, you can use [`compose.yaml`](compose.yaml) directly with Traefik as a reverse proxy:
2022-11-19 18:51:00 +00:00
2023-02-02 12:41:15 +00:00
- Create a directory `~/advlabdb` (You use another path, but then change it also in the following steps).
- Move into the directory `~/advlabdb` and clone the repository into it as `repo`: `git clone https://codeberg.org/Mo8it/AdvLabDB.git ~/advlabdb/repo`
- Copy the directory [`deploy/traefik`](deploy/traefik/) into the parent directory `~/advlabdb`: `cp ~/advlabdb/repo/deploy/traefik ~/advlabdb`
2023-02-02 12:58:50 +00:00
- Open the file `~/advlabdb/traefik/etc/traefik.yaml`, uncomment `email: EMAIL` and replace `EMAIL` it with your email address. You will receive a notification to this email address if any problem with your SSL certificate (for https) occur, for example certificate expiration.
2023-02-02 12:41:15 +00:00
- Open the file `~/advlabdb/traefik/etc/dynamic`, uncomment ``rule: Host(`SERVER_NAME`)`` and replace `SERVER_NAME` with your domain, `advlabdb.mo8it.com` for example.
- Change the time zone `TZ` in `~/advlabdb/traefik/compose.yaml` if it is not `Europe/Berlin`. Use the command `tzselect` to find out your time zone.
- Now start Traefik by running the command `sudo docker compose up -d` in the directory `~/advlabdb/traefik`.
2023-02-02 12:44:13 +00:00
- Create directories for the data and logs volumes: `mkdir ~/advlabdb/{data,logs}`
2023-02-02 12:41:15 +00:00
- Change the time zone `TZ` in `~/advlabdb/repo/compose.yaml` if it is not `Europe/Berlin`.
- Initilialize the database by running `sudo docker compose run advlabdb manage.py setup init-db` in the directory `~/advlabdb/repo` and following the guide.
- Start AdvLabDB by running the command `sudo docker compose up -d` in the directory `~/advlabdb/repo`.
- Visit the domain that you specified in the Traefik configuration as `SERVER_NAME` to test if AdvLabDB is running. If this is not the case, open an issue, maybe I could help :)
2022-11-19 18:51:00 +00:00
## What does the name mean?
**Adv**anced **Lab** **D**ata**B**ase