Created
December 9, 2017 21:23
-
-
Save fhightower/bbb806db4c74ca4bd145e942d7363ba7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get update | |
sudo apt-get install python3-pip python3-dev libpq-dev postgresql postgresql-contrib | |
sudo -u postgres psql | |
<<< | |
CREATE DATABASE myproject; | |
CREATE USER myprojectuser WITH PASSWORD 'password'; | |
ALTER ROLE myprojectuser SET client_encoding TO 'utf8'; | |
ALTER ROLE myprojectuser SET default_transaction_isolation TO 'read committed'; | |
ALTER ROLE myprojectuser SET timezone TO 'UTC'; | |
GRANT ALL PRIVILEGES ON DATABASE myproject TO myprojectuser; | |
\q | |
>>> | |
# it is assumed that the requirements.txt is accurate and has things like django and psycopg2 | |
pip3 install -r requirements.txt | |
# Taken from: https://www.digitalocean.com/community/tutorials/how-to-use-postgresql-with-your-django-application-on-ubuntu-16-04 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment