commit 151f02837ff7bc92a9087088fdc5b1b1fa34caa8 Author: mustafalasheen Date: Tue Apr 15 15:49:05 2025 +0200 Initial commit: FastAPI starter template diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..563dbdb --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM python:3.11-slim + +WORKDIR /app + +COPY requirements.txt . +RUN pip install -r requirements.txt + +COPY . . + +EXPOSE 8000 + +CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"] \ No newline at end of file diff --git a/main.py b/main.py new file mode 100644 index 0000000..556dbdd --- /dev/null +++ b/main.py @@ -0,0 +1,7 @@ +from fastapi import FastAPI + +app = FastAPI() + +@app.get("/") +async def root(): + return {"message": "MARHABA in Ghaymah"} \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..8b6134e --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +fastapi==0.104.1 +uvicorn==0.24.0 \ No newline at end of file