-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create local postGres #8
Comments
sudo docker run --name postgresdev -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=enterpassword -e POSTGRES_DB=prod -p 60000:5432 -d postgres:latest sudo cat backup.sql | sudo docker exec -i postgresdev psql -U postgres sudo docker exec -it postgresdev bash |
added backup.sql |
I have added a file - restoredb.sh. This will configure a psql container and restore the latest backup of the prod database. Next step will be to automatically create daily backups of prod db. To use this file a DB_PW environment variable must be set with the current DB password |
Well done with the script, This will make the local dev setup more smooth. I did run into some issues on my end though, so I refactored the script a bit to handle errors and provide messages for each step. |
Updated to do: add food_category table to allow queries on specific categories |
Want to look into adding the django rest api framework: https://www.django-rest-framework.org/ |
No description provided.
The text was updated successfully, but these errors were encountered: