This repo provides a demo-app for the Ansible training.
- The epel channel is needed -> Install the
epel-releasepackage - Install these yum packages:
python3-devel,python3-pip,MySQL-python,python3-gunicorn - Install PIP packages:
flask,flask-mysql,markupsafe - Clone this repo ->
git clone https://github.com/pstauffer/flask-mysql-app.git
- 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
- Install the
mariadb-serverpackage - 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
- Create a version file
/tmp/app-version.txtand add the tag/branch as content - Create the dbhost file
/etc/dbhost.cfgand add your database host as content, Example
cd <install-dir>
python3 app.py# debian
gunicorn3 --pid /tmp/gunicorn.pid --chdir <install-dir> --bind 0.0.0.0:8000 --daemon wsgi:app
# redhat/centos
gunicorn-3 --pid /tmp/gunicorn.pid --chdir <install-dir> --bind 0.0.0.0:8000 --daemon wsgi:app