- Create
.env
file and set the following variables in it:DATABASE_NAME
DATABASE_USER
DATABASE_PASSWORD
DATABASE_HOST
DATABASE_PORT
sudo -u postgres psql
- Run the following queries against your PostgreSQL database:
CREATE DATABASE <DATABASE_NAME>; CREATE USER <DATABASE_USER> WITH PASSWORD '<DATABASE_PASSWORD>'; ALTER ROLE <DATABASE_USER> SET client_encoding TO 'utf8'; ALTER ROLE <DATABASE_USER> SET default_transaction_isolation TO 'read committed'; ALTER ROLE <DATABASE_USER> SET timezone TO 'UTC'; GRANT ALL PRIVILIGES ON DATABASE <DATABASE_NAME> TO <DATABASE_USER>; ALTER USER <DATABASE_USER> CREATEDB; \q
pipenv install --dev
pipenv run python manage.py migrate
pipenv run python manage.py runserver
TODO: CORS_ORIGIN_WHITELIST