-
Notifications
You must be signed in to change notification settings - Fork 7
Getting Started
Alvin Chow edited this page Jan 18, 2021
·
1 revision
This guide is for OS X
- Python 3.9
brew install [email protected]
- pipenv
brew install pipenv
- Docker for Mac
Checkout
git clone --recurse-submodules [email protected]:alvinchow86/python-backend-template.git
If you forget the --recurse-submodules
flag when cloning, then run this to checkout the submodules
git submodule update --init
Create a local_config.py
file at the project root to override environment variables.
AWS_ACCESS_KEY = '...'
AWS_SECRET_KEY = '...'
Set up the Docker network (one time thing)
docker network create alvinchow
Build Docker image
docker-compose build
Start containers
docker-compose up -d
Once Docker is up, get into a container and run this to initialize and seed the database
docker-compose exec web bash
manage seed local --reset-db (or ./manage.py seed local --reset-db)
You may need to do pip install -e .
the first time in a Docker container.