diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..c2d5065 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,7 @@ +# Ignore everything +** + +# But include +!server.py +!requirements.txt + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f5e96db --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +venv \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f6c9afa --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM python:3.11.9-slim + +WORKDIR /podbee/ + +RUN apt update && apt install -y curl wget inetutils-ping dnsutils telnet + +COPY . . + +RUN pip install -r requirements.txt + +CMD uvicorn server:app --host 0.0.0.0 --port 80 diff --git a/docker/Dockerfile b/docker/Dockerfile deleted file mode 100644 index 1a843b9..0000000 --- a/docker/Dockerfile +++ /dev/null @@ -1,3 +0,0 @@ -FROM debian:stable-slim - -RUN apt update && apt install -y curl wget inetutils-ping dnsutils telnet diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..1d7bf59 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,13 @@ +annotated-types==0.6.0 +anyio==4.3.0 +click==8.1.7 +exceptiongroup==1.2.1 +fastapi==0.110.2 +h11==0.14.0 +idna==3.7 +pydantic==2.7.1 +pydantic_core==2.18.2 +sniffio==1.3.1 +starlette==0.37.2 +typing_extensions==4.11.0 +uvicorn==0.29.0 diff --git a/server.py b/server.py new file mode 100644 index 0000000..d774233 --- /dev/null +++ b/server.py @@ -0,0 +1,10 @@ +from fastapi import FastAPI +from fastapi.responses import JSONResponse + +app = FastAPI() + + +@app.get("/") +async def hello(): + message = {"message": "Thank you for using PodBee!"} + return JSONResponse(content=message, status_code=200)