A stock trading simulation app created using python flask framework
You could do both development and deployment without docker but this readme doesn't cover that part as of now.
- Make sure you have docker and docker-compose installed.
- If you do not have docker, you could follow the instructions at Getting started with docker
- Create a .env file at the root of project directory with your secrets,
following the template.env structure and source it.- The API_KEY could be obtained from IEX Cloud
- View info about SECRET_KEY at Flask documentation
- DATABASE_URL as the name suggests just points to your database
For development you could use something simple likeDATABASE_URL="sqlite:///local.db"
,
For production you will likely define it in docker-compose file in compose_production directory
- The API_KEY could be obtained from IEX Cloud
- Change directory into the main_app directory
- Do a
docker-compose up -d
- Your site should now be served at port 5000 and reflect any changes you make to the code.
You may want to make some changes in nginx configuration and
hide postgres credintials from compose_production/docker-compose.yml file.
- Change directory into the compose_prduction directory
- Do a
docker-compose -f docker-compose.yml up -d
- Your site should now be served at port 80 in your ip.
This project is basically a clone of CS50's finance project
Licensed under the MIT License.