fastapi-template
A FastAPI and SQLAlchemy project template with Docker and GitHub Actions.
File Explorer
Download Latest Version (.zip)- docker-compose.yml
- code-integration.yml
- 0001_initial_migration.py
- __init__.py
- __init__.py
- env.py
- script.py.mako
- __init__.py
- Dockerfile
- logging.conf
- main.py
- repository.py
- test_all.py
- .dockerignore
- .gitignore
- .pre-commit-config.yaml
- alembic.ini
- docker-compose.yml
- LICENSE
- Makefile
- poetry.lock
- pyproject.toml
- README.md
# Installation Guide
1. Get the code
git clone https://github.com/Donnype/fastapi-template
Downloads the entire project code from GitHub to your computer.
cd fastapi-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 compose -f .ci/docker-compose.yml up -d --build
Runs the command against the services defined in the compose file.
Run docker compose ps to check the containers are Up. If the README mentions a port, open http://localhost:PORT in your browser.
3. Python
EasyPrerequisites
$ poetry run alembic upgrade head && poetry run uvicorn api.main:app --port 5000 --reload
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.
4. Make
MediumPrerequisites
- Git Needed to download the project code from GitHub.
- Make Usually pre-installed on Linux/macOS. On Windows, install separately (e.g. via MSYS2 or WSL).
make
Compiles the code based on the generated build configuration to produce an executable.
If it finishes without errors, it worked. Try running the generated executable directly.
// repository documentation
Was this content helpful?
(0 ratings)
