Installation - chaosmentors/the-godparent GitHub Wiki
Version 0.1.21213.1
Created by famaniel
Last modified by famaniel
Python version
The godparent is based on Python. To run on your device, the app needs to support Python in version 3.7 or above.
Dependencies
The service is depending on third-party-packages, to allow easier development and added features. The dependencies are as follows:
- SQLite >=3.35: A lightweight, library-based SQL DBMS. Used to store the data.
- SqlAlchemy >= 1.3.23: An ORM framework for SQL databases.
- Flask >= 1.1.2: A python framework for developing web-based applications in python.
- Flask-WTF >= 0.14: A flask-extension for wrapping the WTForms framework into flask.
- Flask-SqlAlchemy >= 2.5.1: Simplified front end for integrating SQLAlchemy into Flask.
- Flask-Migrate >= 3.0.0: ORM migration framework for updating Flask-SQLAlchemy based databases.
- Flask-Table >= 0.5.1: A table renderer for Flask.
- Alembic >= 1.6.2: Database migration tool, that is a dependency of flask-migrate.
- Flask-Login >= 0.5: A login manager for Flask applications.
- WTForms >=2.2.1: A lightweight python framework to design and deliver forms on web-applications.
- email-validator: A validator for email addresses used by WTForms
- Werkzeug <=1.0.1: A tool to create WSGI compatible applications.
- Jinja >=2.11: A template processor for Python.
Configuration
The service is configured through a configuration class, named
config.py.
This file contains the basic configuration parameters. The configuration parameters are usually either stored in the configuration file, or are passed as an environment variable, but falling back to the default, when the environment variable is unset. Especially with passwords, use the environment variable, in order to store the secrets outside the local file system. Docker provides wide range support for configuring through environment variables.
Configuration parameters
SECRET_KEY
The SECRET_KEY value is a string, that is used by the system to create
tokens and protect forms from Cross-site request forgery
The secret key must be set to an individual value, which must not be known to
anyone on the outside. Therefore the instance folder should never be accessible
through calls of the web site.
SQLALCHEMY_DATABASE_URI
This contains a URI, that contains the SQLAlchemy database. The URI consists of the name of the database engine, and the path where the database is stored. For sqlite databases, where the database is simply a file, a URI can look like this:
sqlite:///my-folder/database.sqlite
The environment variable to store the data in is called DATABASE_URI
SQLALCHEMY_TRACK_MODIFICATIONS
Allows SQLAlchemy to send a notification to the app, every time the database is about to be made in the database. Since the application is the only db_writer, this feature is not needed. Therefore it is usually set to false, and cannot be configured through an environment variable.