This is a feature request app. It allows IWS staff to view, create, update and delete feature requests. This project fulfills the requirements listed on PROJECT.
-
Users can create feature requests by clicking on the NEW FEATURE REQUEST BUTTON.
-
Users can update feature requests by clicking on the Edit button.
-
Users can delete feature requests by clicking on the Delete button.
-
Users can view the descriptions of their feature requests by clicking on the View button.
-
Users can view all feature requests for each client sorted by priority on separate tables.
-
Feature requests for each client cannot share priorities. When a created or updated feature request's priority is similar to that of another existing feature request for a client, all of that client's priorities are re-ordered. This is done by incrementing each feature request that has a priority greater than on equal to the new or updated request's priority by one.
Create two PostgreSQL databases, one for the app and one for testing.
git clone https://github.com/edkahara/britecore-implementation-test.git
cd britecore-implementation-test
git checkout project
python3 -m venv env
or py -3 -m venv env
for Windows.
On the root folder, create a .env file or an env.bat file for Windows and set your environment variables using env.example as a template. Then run:
source .env
or env.bat
for Windows.
pip install -r requirements.txt
python manage.py db init
python manage.py db migrate
python manage.py db upgrade
nosetests tests/tests.py --with-coverage --cover-package=web
or nosetests --with-coverage --cover-package=web
for Windows.
flask run
Navigate to http://localhost:5000 in your web browser to view the application.
Install Docker and Docker Compose.
git clone https://github.com/edkahara/britecore-implementation-test.git
cd britecore-implementation-test
git checkout dockerization
In the docker-compose.yml file, change the environment variables to suit your preferences. If you have PostgreSQL installed locally, change the db ports to 5433:5432.
In the create.sql file inside the db folder, ensure that the database names match the ones that you've set in the docker-compose.yml file.
docker-compose build
docker-compose up
Navigate to http://localhost:5000 in your web browser to view the application.
While the application is running, open a new terminal in your repository and test the application.
docker-compose exec web nosetests /app/tests/tests.py --with-coverage --cover-package=web
Follow the instructions here to sign up for AWS (if necessary) and create an IAM user (if necessary).
In the credentials file inside the .aws folder, add your IAM user's aws access key id and aws secret access key.
Install Docker Machine.
git clone https://github.com/edkahara/britecore-implementation-test.git
cd britecore-implementation-test
git checkout deployment
In the docker-compose.yml file, change the environment variables to suit your preferences.
In the create.sql file inside the db folder, ensure that the database names match the ones that you've set in the docker-compose.yml file.
docker-machine create --driver amazonec2 --amazonec2-open-port 80 britecore-implementation-test
By default, the amazonec2 region for your instance will be us-east-1 (N. Virginia). To use a different region run:
docker-machine create --driver amazonec2 --amazonec2-open-port 80 --amazonec2-region your-amazonec2-region britecore-implementation-test
docker-machine env britecore-implementation-test
eval $(docker-machine env britecore-implementation-test)
docker-compose up
Open a new terminal and grab the machine's IP.
docker-machine ip britecore-implementation-test
Navigate to http://docker_machine_ip in your web browser to view the application.
- Ubuntu 18.04
- Python 3.6.7
- PostgreSQL 11
- Flask
- SQLAlchemy
- jQuery
- Materialize CSS
- Docker
- AWS EC2
- Gunicorn
- Nginx
Edward Njoroge