A python Fast API to serve Conquest, a chrome extension for USC students.
- Install pyenv to manage python versions
- Install Docker compose
- Copy
.env
values from.env.sample
python3 -m venv venv
: create a virtual envsource venv/bin/activate
: activate virtual envpip install -r requirements.txt
: install server dependenciespip install -r requirements-dev.txt
: install developer tools (optional)
make db
: start postgres database with Dockermake local
: start local Uvicorn server on port3002
- Set env variable
TARGET=development
make build
: build Docker image- Rebuilding the image is only needed if the dependencies or Docker setup changes
make docker
: up Docker container with a Uvicorn server on port8000
Note
Both development servers automatically reload when any changes are made in the /app
folder
- Set env variable
TARGET=production
make build
: build Docker image- The image must be rebuilt on any change
make docker
: up Docker container with a Gunicorn server running multiple workers on port8000