No description
Find a file
2024-02-12 22:31:02 +01:00
Calculated_Statistic Updated Main.py and Input.js to adress bugs 2022-11-01 15:35:57 +00:00
MySQL_Command_Files Version 1 2023-05-24 21:30:17 +00:00
Scripts fixed small bug in datenausgabe 2023-08-07 15:50:29 +00:00
static Security update 2023-06-20 11:13:18 +00:00
templates Added new templates 2023-06-27 13:45:27 +00:00
.breakpoints Inital commit 2022-04-13 16:52:46 +00:00
.gitignore Added Stat-tests 2023-04-08 10:45:02 +00:00
.gitpod.yml Added Password mail 2022-07-10 13:32:16 +00:00
backup_table.py Fixed some bugs 2023-04-16 17:00:42 +00:00
Clean_Currently_Active.py Fixed insert into DB Function 2022-07-28 15:41:14 +00:00
LICENSE Create LICENSE 2023-02-10 15:34:36 +01:00
main.py fixed small bug in datenanalyse 2023-06-20 17:17:35 +00:00
MANIFEST.in Inital commit 2022-04-13 16:52:46 +00:00
mcrc-db.service Update mcrc-db.service 2022-07-27 11:41:09 +02:00
package-lock.json fix: upgrade bootstrap5-tags from 1.5.22 to 1.5.23 2023-06-30 15:22:27 +00:00
package.json fix: upgrade bootstrap5-tags from 1.5.22 to 1.5.23 2023-06-30 15:22:27 +00:00
README.md Update README.md 2023-04-08 08:40:53 +02:00
requirements.txt fix: requirements.txt to reduce vulnerabilities 2024-02-12 03:28:59 +00:00
stat_template.tex Added latex package for borders 2023-05-24 15:34:06 +00:00
template.html Fixed some bugs 2023-04-16 17:00:42 +00:00
Update_Database.txt Fixed some bugs, changed Statistik HTML 2022-11-18 09:16:50 +00:00

Datenbank zum Kolorektalem Karzinom

benötigte Umgebungsvariablen:

Umgebungsvariable Bedeutung
KRK_DB_HOST IP/Host des MySQL-Datenbankservers
KRK_DB_USER Datenbankserver-Benutzername
KRK_DB_PASS Datenbankserver-Password
KRK_DB_DATABASE Zu nutzende Datenbank
KRK_APP_HOST IP-Adresse, auf welcher die Applikation verfügbar sein soll
KRK_APP_PORT Port, auf welchem die Applikation lauscht (Ports unterhalb von 1024 unter Linux i.d.R. nur mit root-Rechten nutzbar)
KRK_DB_MAIL_SERVER Email Server, von welchem die Mails verschickt werden sollen
KRK_DB_MAIL_USER Nutzername, auf dem besagtem Mail-Server
KRK_DB_MAIL_SENDER Email-Adresse, zugehörig dem Nutzername
KRK_DB_MAIL_PASSWORD Passwort zur Email-Adresse / Nutzername
KRK_DB_SENDER Absenderadresse für Emails

SystemD service file:

Vor der Installation

  • MariaDB installieren
  • Pfad der main.py in ExecStart
  • Pfad des Arbeitsverzeichnisses in WorkingDirectory auf Pfad der geklonten Repository ändern
  • Werte von User und Group entsprechend anpassen
  • Tectonic (LaTeX "Compiler") installieren mit curl --proto '=https' --tlsv1.2 -fsSL https://drop-sh.fullyjustified.net |sh

Installation

sudo cp -v mcrc-db.service /etc/systemd/system #copy service file
sudo systemctl enable mcrc-db.service          #enable service
sudo systemctl start mcrc-db.service           #start service
sudo systemctl status mcrc-db.service          #check if the service started
sudo journalctl -f -u mcrc-db.service          #inspect the logs

Deinstallation

sudo systemctl stop mcrc-db.service
sudo systemctl disable mcrc-db.service
sudo systemctl daemon-reload

Cronjobs Hier einmal kurz aufgeschlüsselt, wie die Cronjobs für die Richtige Benutzung aufzusetzen sind.

*/10 * * * * /usr/bin/python3 /path/to/delete_currently_active.py && printf "$(date -u)\n" 2>&1 >> /path/to/cron.log
0 3 * * * /usr/bin/git -C /path/to/directory pull --rebase && /usr/bin/pip install -r path/to/requirements.txt && /usr/bin/systemctl mcrc-db.service>
10 3 * * * /usr/bin/python3 path/to/backup_table.py