This repository contains the code for the Drachenwald Order of Precedence. It is a Flask app, programmed in Python.
The repository does not contain any personal information, and has only database structure, and test data in it.
Create a sqlite file named op.sqlite with the contents of the op.sqlite.sql file, then spool that data over to MySQL. Our application's history began with sqlite, and is now using MySQL.
sqlite3 op.sqlite < op.sqlite.sql
mysql -uroot 'CREATE DATABASE drachdb;'
mysql -uroot "GRANT ALL PRIVILEGES ON drachdb.* TO 'op'@'localhost' IDENTIFIED BY 'op';"
So, now you have an empty local MySQL database, primed to transfer the sqlite data into.
With a virtualenv running:
python transferdb.py
pip install virtualenv
virtualenv venv
source ./venv/bin/activate
pip install -r requirements.txt
flask --app viewer run
flask --app viewer run
:export FLASK_APP=viewer.py
export FLASK_DEBUG=true
flask run
docker-compose up
The website will be served on http://0.0.0.0:5000.
The database runs on a MariaDB instance. You can print its version like:
$ docker exec -ti dw_op-db-1 mariadb --version
mariadb from 11.1.2-MariaDB, client 15.2 for debian-linux-gnu (x86_64) using EditLine wrapper
The database container, upon not having a database, reads the files in sql-init/
and execute that SQL.
To view the database container:
docker ps # show running containers
docker exec -it dw_op_db_1 bash # get a Bash shell into the container
If you wish to remove the whole dataset, so that next time you start Docker Compose, it is reinitialized from sql-init files.
docker volume rm dw_op_data
To interact with the database using the normal CLI interface:
$ docker exec -ti dw_op-db-1 mariadb -uop -pop
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 36
Server version: 11.1.2-MariaDB-1:11.1.2+maria~ubu2204 mariadb.org binary distribution
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> USE drachdb;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
MariaDB [drachdb]>
the OP uses a google service account to send email & add recommendations to a spreadsheet. The details for this account can be found under the workspace admin accounts on https://console.cloud.google.com/ https://apps.google.com/supportwidget/articlehome?hl=en&article_url=https%3A%2F%2Fsupport.google.com%2Fa%2Fanswer%2F7378726%3Fhl%3Den&assistant_id=generic-unu&product_context=7378726&product_name=UnuFlow&trigger_context=a