The IWS Features app was deployed on AWS EC2 Ubuntu Server 18.04 LTS
The demo url: DEMO
Prerequisites:
- Python 2
- virtualenv
- MySQL
Clone the repo from GitHub:
git clone https://github.com/olawolemoses/features
Change to the directory
cd features
Create a virtual environment for the project and activate it:
virtualenv venv
source venv/bin/activate
Install the required packages:
pip install --upgrade setuptools
pip install -r requirements.txt
- Create a MySQL user on your terminal and a MySQL database.
- Grant all privileges on your database to the user, like so:
$ mysql -uroot -p
mysql> CREATE USER 'iws_admin'@'localhost' IDENTIFIED BY 'iws2016';
mysql> CREATE DATABASE `hrequests-dev`;
mysql> GRANT ALL PRIVILEGES ON `hrequests-dev` . * TO 'iws_admin'@'localhost';
In the directory config.py
file currently exist. The app has the following configuration variables:
- SECRET_KEY
- SQLALCHEMY_DATABASE_URI (
'mysql://iws_admin:iws2016@localhost/hrequests-dev'
)
You can now run the app with the following command:
python manager.py db init
python manager.py db migrate
python manager.py db upgrade
python manager.py deploy
You can now run the app with the following command:
python manager.py runserver
First, create a test database and grant all privileges on your test database to your user:
$ mysql -u root
mysql> CREATE DATABASE `hrequests-test`;
mysql> GRANT ALL PRIVILEGES ON `hrequests-test` . * TO 'iws_admin'@'localhost';
To test, run the following command: python manager.py test
Copyright (c) 2018 olawolemoses