After forking this repository for your own work, you may need to set up an isolated environment in Python. I suggest using pipenv for this:
# Install pipenv itself
python3 -m pip install pipenv
# Then from within the root directory of this project,
# create a new virtual environment and install dependencies
pipenv shell
pipenv install -r requirements.txt
# Exit the virtual environment at any point with "exit"
# Return to it by running "pipenv shell" from the directory.
As typical with FastAPI development, run the local server as you code
Build locally using the docke compose build command. Then run the stack in detached mode:
docker compose up -d
Look in .github/workflows/build.yml for a sample template that completes the following steps:
- Builds the container image.
- Pushes the new image to the container registry of your choice (i.e. Docker Hub, GHCR, etc.)
- (Optional) Pushes a message to a cluster triggering a re-deployment of the app.