https://github.com/washbin/trader
A stock trading simulation app created using flask framework
https://github.com/washbin/trader
docker flask jinja2 python
Last synced: about 2 months ago
JSON representation
A stock trading simulation app created using flask framework
- Host: GitHub
- URL: https://github.com/washbin/trader
- Owner: washbin
- License: mit
- Created: 2021-06-25T12:21:11.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2023-02-16T04:14:11.000Z (over 3 years ago)
- Last Synced: 2025-10-30T08:56:47.016Z (8 months ago)
- Topics: docker, flask, jinja2, python
- Language: Python
- Homepage:
- Size: 65.4 KB
- Stars: 0
- Watchers: 1
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Trader
A stock trading simulation app created using python flask framework
# Running Yourself
> 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](https://www.docker.com/get-started)
- 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](https://www.iexcloud.io/)
> - View info about SECRET_KEY at [Flask documentation](https://flask.palletsprojects.com/en/2.0.x/config/#SECRET_KEY)
> - DATABASE_URL as the name suggests just points to your database \
> For development you could use something simple like `DATABASE_URL="sqlite:///local.db"`, \
> For production you will likely define it in docker-compose file in compose_production directory
## Development
1. Change directory into the main_app directory
2. Do a `docker-compose up -d`
3. Your site should now be served at port 5000 and reflect any changes you make to the code.
## Deployment
> You may want to make some changes in nginx configuration and \
> hide postgres credintials from compose_production/docker-compose.yml file.
1. Change directory into the compose_prduction directory
2. Do a `docker-compose -f docker-compose.yml up -d`
3. Your site should now be served at port 80 in your ip.
# Acknowledgments
> This project is basically a clone of [CS50's finance project](https://finance.cs50.net/)
# License
Licensed under the [MIT License](./LICENSE).