- install_docker
- install_docker-compose
- fork and clone repo
- docker-compose up
- Stop that process Ctrl+c
- Download test data set
- docker-compose run --rm web python manage.py loaddata working-herokudump.json
- docker-compose up
- download postgres
- generic instructions here
- if using homebrew:
brew instal postgresql
- fork and clone repo
- activate virtual environment
venv
is part of python3 base image.- cd to dcstreethockey folder
python3 -m venv [path to virtual environment folder]
(first time only)source [path to virtual environment]/bin/activate
- pip install -r requirements.txt
- Make sure postgres is running and Database exists
brew services start postgresql
psql -l
- if dcstreethockey doesn't exist continue
createdb dcstreethockey
createuser user
uvicorn dcstreethockey.asgi:application --host 0.0.0.0 --port 8000
./manage.py makemigrations
./manage.py migrate
git push origin master
heroku config:set DJANGO_SETTINGS_MODULE=dcstreethockey.settings.production
- In render UI, click on recovery tab, and downlowd the latest sql.gz file
- Then run:
psql -U user -d dcstreethockey < ~/Downloads/<<file_name>>.sql
- Get Connection Details:
- Log in to your Render dashboard and navigate to your PostgreSQL service. Copy the connection string provided, which will be in the format:
postgres://<username>:<password>@<host>:<port>/<database>
- Save your SQL script locally, e.g., db_migration_scripts/insert_matchup.sql.
- Run the following command in your terminal, replacing <connection_string> with the actual connection string and path/to/your/script.sql with the path to your SQL script:
psql postgres://<username>:<password>@<host>:<port>/<database> -f path/to/your/script.sql