Note: Currently I'm working on deployment and backend. For the moment it is running in a free EC2 instance http://ec2-3-15-217-168.us-east-2.compute.amazonaws.com:1337/
- Clone this repository
git clone https://gitlab.com/dagomez30/trading_bot.git
- Access to
cd trading_bot
- Install dependencies
pip install -r requirements.txt
- If you don't have postgresql installed go to
https://www.postgresql.org/download/
- After Install postgresql login with the database user created.
- Create a new database user
trader
with the privilege of create databasesCREATE USER trader WITH PASSWORD 'trading2077' CREATEDB;
- Execute the command
python manage.py makemigrations
- Execute
python manage.py migrate
- Create the superuser
python manage.py createsuperuser
- Finally, run the server
python manage.py runserver
entrypoint.sh - Script to verify that postgres is working before running the Django development server.
entrypoint.prod.sh - Script to verify that postgres is working before running the Django production server.
requirements.txt - The configuration file requirements.txt allows to install the specified packages necessary for the project.
docker-compose.yml - Allows to deploy, combine and configure the docker-containers Django and Postgresql for development.
docker-compose.prod.yml - Allows to deploy, combine and configure the docker-containers Django, Nginx and Postgresql for production.
nginx.conf - Nginx base configuration.
Dockerfile - Contains the instructions to build the nginx image
- manage.py - Script to run admin tasks
- settings.py - This file contains the settings and some environment variables.
- urls.py - Main urls file.