Skip to content

A FastAPI server for Conquest, a Chrome extension for USC students.

License

Notifications You must be signed in to change notification settings

brennenho/conquest-server

Repository files navigation

Conquest Server

Python style: black lint deployment health check

A python Fast API to serve Conquest, a chrome extension for USC students.

Install development requirements

  1. Install pyenv to manage python versions
  2. Install Docker compose
  3. Copy .env values from .env.sample
  4. python3 -m venv venv: create a virtual env
  5. source venv/bin/activate: activate virtual env
  6. pip install -r requirements.txt: install server dependencies
  7. pip install -r requirements-dev.txt: install developer tools (optional)

Run local development server

  • make db: start postgres database with Docker
  • make local: start local Uvicorn server on port 3002

Run Dockerized development server

  • 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 port 8000

Note

Both development servers automatically reload when any changes are made in the /app folder

Run Dockerized production server

  • 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 port 8000

About

A FastAPI server for Conquest, a Chrome extension for USC students.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published