uvicorn-poetry-fastapi-project-template
Cookiecutter project template for starting a FastAPI application. Runs in a Docker container with Uvicorn ASGI server on Kubernetes. Supports AMD64 and ARM64 CPU architectures.
File Explorer
Download Latest Version (.zip)- action.yaml
- pipeline.yml
- dependabot.yml
- post_gen_project.py
- __init__.py
- conftest.py
- constants.py
- test_custom_config.py
- test_default_config.py
- test_docker_image_build.py
- test_tools.py
- action.yaml
- pipeline.yml
- __init__.py
- main.py
- __init__.py
- test_api_endpoints.py
- __init__.py
- conftest.py
- .dockerignore
- .gitignore
- .pre-commit-config.yaml
- Dockerfile
- pyproject.toml
- README.md
- .gitignore
- .pre-commit-config.yaml
- cookiecutter.json
- LICENSE
- poetry.lock
- pyproject.toml
- README.md
# Installation Guide
1. Get the code
git clone https://github.com/max-pfeiffer/uvicorn-poetry-fastapi-project-template
Downloads the entire project code from GitHub to your computer.
cd uvicorn-poetry-fastapi-project-template
Moves into the project folder you just downloaded.
2. Docker
Easy RecommendedPrerequisites
- Git Needed to download the project code from GitHub.
- Docker Desktop Needed to build and run containers. Install it and keep it running in the background.
docker build --tag my-application:1.0.0 .
Builds a runnable image based on the Dockerfile.
docker run -it --rm my-application:1.0.0
Runs the built image as an actual container.
Run docker compose ps to check the containers are Up. If the README mentions a port, open http://localhost:PORT in your browser.
Pulled directly from this repo's README.
3. Python
EasyPrerequisites
cookiecutter https://github.com/max-pfeiffer/uvicorn-poetry-project-template
Type this command into your terminal and run it.
poetry install
Installs the libraries listed in pyproject.toml.
poetry run uvicorn --workers 1 --host 0.0.0.0 --port 8000 app.main:app
Type this command into your terminal and run it.
If it runs without errors and prints output in the terminal, it worked.
Pulled directly from this repo's README.
// repository documentation
Was this content helpful?
(0 ratings)
