Skip to content

Displaying the most underrated fantasy basketball players in advance

Notifications You must be signed in to change notification settings

dnlmrtn/waiver-wizard

Repository files navigation

Waiver Wizard: Track Fantasy Waivers in Advance

Local Testing Setup

Setup ENV Variables

Create .env file from example:

cp .env.example .env.dev

Replace with the following example info:

POSTGRES_USER=postgres
POSTGRES_PASSWORD=supersecretpassword

DB_HOST=db
DB_NAME=app
DB_USER=postgres
DB_PASS=supersecretpassword
DB_PORT=5432

DJANGO_SUPERUSER_USERNAME=admin
DJANGO_SUPERUSER_EMAIL=example@exmaple.com
DJANGO_SUPERUSER_PASSWORD=admin

DJANGO_SETTINGS_MODULE=app.settings
LEAGUE_ID=454.l.43895

ALLOWED_HOSTS='["localhost"]'

CORS_ORIGIN_WHITELIST=http://localhost:3000

DEBUG=True
SECRET_KEY=django-insecure-74ek#$su&p=oz$_al^9pz7q#olw4_vo6s70$jgwb_@cl_=hw2m
SITE_URL='localhost'

Install Requirements

bash ./scripts/install_requirements.sh

Database Setup

Ensure your .env.dev file has the necessary variables, then start the database container:

docker-compose up -d db

Run the database initialization script:

docker exec waiver-wizard-db-1 bash /scripts/init_database.sh

Verify the database was created:

docker exec -it waiver-wizard-db-1 psql -U postgres

To exit:

\q

Production Deployment

Setup ENV Variables

Create .env file from example:

cp .env.example .env.prod

Replace example variables with required information.

Install Requirements

bash ./scripts/install_requirements.sh

Database Setup

Ensure your .env.prod file has the necessary variables, then start the database container:

docker-compose up -d db

Run the database initialization script:

docker exec waiver-wizard-db-1 bash /scripts/init_database.sh

Deploy containers

Run production deployment script:

bash ./scripts/deploy_to_production.sh