- This project reads the data from .csv files and stores it into SQLite database
- Runs a Flask webserver to make it possible to review stored data via browser
- Added some basic filters on UI side to filter data by salary
To start this project under Ubuntu (or EC2 instance with Ubuntu) you'll need:
- virtualenv (to isolate Python's installed libraries)
-
Create your virtual environment (it's recommended to create it in the project's directory):
virtualenv venv
-
Activate your virtual environment:
. venv/bin/activate
-
Install required Python's dependencies:
pip install -r requirements.txt
Well, your environment is ready!
To move all the data from your .csv files stored in data
folder please run:
`python create_databases.py`
If everything is OK, salaries.sqlite
file will appear in your folder.
To start your web application please run:
`python web_app.py &`
It starts a webserver on 5000
port.
To make sure everything works fine, open your browser and check it:
http://<your_ip_address>:5000
If you're running this under AWS EC2 instance it requires to open inbound traffic for 5000
port.
Download Heroku Cli from:
https://devcenter.heroku.com/articles/getting-started-with-python#set-up
Login into heroku via Cli(using your heroku credentials):
heroku login
Clone project sources from Github:
git clone https://github.com/StrongBrain/salary_reports.git
Move into directory with sources:
cd salary_reports
Create an application on Heroku:
heroku create
Deploy your code into Heroku:
git push heroku master
Ensure that at least one instance of the app is running:
heroku ps:scale web=1
Now visit the app at the URL generated by its app name. As a handy shortcut, you can open the website as follows:
heroku open