This is a simple FastAPI project with Docker and Sentry integration.
Make sure you have Python 3.10+ installed on your system. Also make sure Docker and Docker Compose are installed.
Create a virtual environment and install the necessary dependencies.
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
Build the Docker image and launch the container.
docker build -t fastapi-app .
docker run -p 8000:8000 fastapi-app
Your app will be running at http://127.0.0.1:8000
.
To set up Sentry error tracking, set the Sentry DSN in the environment.
export SENTRY_DSN=<your-sentry-dsn>