diff --git a/backend/Dockerfile b/backend/Dockerfile new file mode 100644 index 0000000..414213b --- /dev/null +++ b/backend/Dockerfile @@ -0,0 +1,10 @@ +FROM python:alpine +WORKDIR /app/backend + +COPY ./requirements.txt /app +RUN pip install --no-cache-dir -r /app/requirements.txt + +COPY ./src /app/backend + +EXPOSE 8000 +CMD ["uvicorn", "main:app", "--host", "0.0.0.0"] diff --git a/backend/README.md b/backend/README.md new file mode 100644 index 0000000..f4e3dfc --- /dev/null +++ b/backend/README.md @@ -0,0 +1,7 @@ +# Daily Agenda App Backend +Written in FastAPI. + +```shell +docker build -t agenda-backend . +docker run --rm agenda-backend +``` diff --git a/backend/requirements.txt b/backend/requirements.txt new file mode 100644 index 0000000..be6eebf --- /dev/null +++ b/backend/requirements.txt @@ -0,0 +1,4 @@ +fastapi +uvicorn[standard] +sqlalchemy +pydantic diff --git a/backend/src/main.py b/backend/src/main.py new file mode 100644 index 0000000..50a628f --- /dev/null +++ b/backend/src/main.py @@ -0,0 +1,9 @@ +from fastapi import FastAPI + +app = FastAPI() + + +@app.get('/') +async def home(): + return 'homepage' +