Skip to content

fsauch/flask-mysql-app

 
 

Repository files navigation

Flask Mysql Demo-App

This repo provides a demo-app for the Ansible training.

Requirements

Frontend

Debian

  • Install this apt/deb packages: pythoni3-dev, python3-pip, python3-gunicorn, gunicorn3
  • Install PIP packages: flask, flask-mysql, markupsafe
  • Clone this repo -> git clone https://github.com/pstauffer/flask-mysql-app.git

Backend

  • Install the mariadb-server package
  • Configure mysql to listen on the address 0.0.0.0 -> bind-address = 0.0.0.0
  • Download the mysqldump
  • Load the dump -> mysql --user=root --password='' < /tmp/students.sql

Configuration

  • Create a version file /tmp/app-version.txt and add the tag/branch as content
  • Create the dbhost file /etc/dbhost.cfg and add your database host as content, Example

Run your application

with python

cd <install-dir>
python3 app.py

Packages

 
 
 

Languages

  • HTML 62.2%
  • Python 37.8%