Description
Make the project runnable anywhere with a single command using Docker and docker-compose.
What to do
Acceptance Criteria
make up starts both services with no manual steps
http://localhost:8000/docs works after running make up
- The app connects to the PostgreSQL container (not SQLite)
make down stops and removes containers cleanly
Difficulty
🔴 Advanced
Description
Make the project runnable anywhere with a single command using Docker and docker-compose.
What to do
Dockerfilefor the FastAPI app:python:3.11-slimdocker-compose.ymlwith two services:app— the FastAPI containerdb— a PostgreSQL containerappservice should depend ondband readDATABASE_URLfrom compose environmentMakefilewith:make up→docker-compose up --buildmake down→docker-compose downmake logs→docker-compose logs -fAcceptance Criteria
make upstarts both services with no manual stepshttp://localhost:8000/docsworks after runningmake upmake downstops and removes containers cleanlyDifficulty
🔴 Advanced