1
0
Fork 0
mirror of https://codeberg.org/Mo8it/AdvLabDB.git synced 2024-09-17 18:31:15 +00:00
No description
Find a file
2023-11-01 21:49:10 +01:00
advlabdb Remove todos 2023-11-01 21:49:10 +01:00
cli Rename database to advlabdb.sqlite 2023-02-02 13:39:58 +01:00
deploy Rename settings template file 2023-02-02 13:40:12 +01:00
.containerignore Update .containerignore 2023-11-01 21:38:52 +01:00
.flake8 Add flake8 2022-07-03 18:41:44 +02:00
.gitignore Rename database to advlabdb.sqlite 2023-02-02 13:39:58 +01:00
.typos.toml Update deps 2022-10-08 14:44:14 +02:00
compose.yaml Set the environment variable ADVLABDB_DATA_DIR in the Containerfile 2023-02-02 13:41:08 +01:00
Containerfile Set the environment variable ADVLABDB_DATA_DIR in the Containerfile 2023-02-02 13:41:08 +01:00
init.sh Default settings before secrets generation 2023-02-02 14:07:03 +01:00
LICENSE New version and update license year 2023-02-02 14:02:08 +01:00
manage.py Remove redundant admin templates 2022-09-20 18:15:56 +02:00
poetry.lock Update deps 2023-11-01 21:48:15 +01:00
pyproject.toml New version and update license year 2023-02-02 14:02:08 +01:00
README.md Remove todos 2023-11-01 21:49:10 +01:00
requirements.txt Update deps 2023-11-01 21:48:15 +01:00
run.py Make run.py executable 2022-09-10 18:26:56 +02:00

AdvLabDB

Code style: black Imports: isort security: bandit

About

AdvLabDB is a database with a web interface for labs.

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.

Getting Started

You can deploy AdvLabDB easily using Docker. Take a look at 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. 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

If you don't want to use your own reverse proxy, you can use compose.yaml directly with Traefik as a reverse proxy:

  • 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 into the parent directory ~/advlabdb: cp ~/advlabdb/repo/deploy/traefik ~/advlabdb
  • 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.
  • 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.
  • Create directories for the data and logs volumes: mkdir ~/advlabdb/{data,logs}
  • 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 :)

What does the name mean?

Advanced Lab DataBase