This is a basic FastAPI project with Docker support.
app/: Contains the application code.tests/: Contains the tests.requirements.txt: Python dependencies.Dockerfile: Docker configuration.docker-compose.yml: Docker Compose configuration.
-
Install dependencies:
pip install -r requirements.txt
-
Run the application:
uvicorn app.main:app --reload
-
Run tests:
pytest
-
Build and run with Docker Compose:
docker-compose up --build
The API will be available at
http://localhost:8000.
To verify that the Docker image builds and runs correctly, use the provided script:
./verify_docker.sh