Init scanner with fastapi

This commit is contained in:
Zoe Roux 2025-05-04 20:19:02 +02:00
parent ae9bfcfd41
commit b3d8ffc89d
No known key found for this signature in database
3 changed files with 18 additions and 3 deletions

View File

@ -2,8 +2,8 @@ FROM python:3.13
WORKDIR /app WORKDIR /app
COPY ./requirements.txt . COPY ./requirements.txt .
RUN pip3 install -r ./requirements.txt RUN pip3 install --no-cache-dir --upgrade -r ./requirements.txt
COPY . . COPY . .
ENTRYPOINT ["python3", "-m"]
CMD ["scanner"] CMD ["fastapi", "run", "scanner/main.py", "--port", "80"]

7
scanner/Dockerfile.dev Normal file
View File

@ -0,0 +1,7 @@
FROM python:3.13
WORKDIR /app
COPY ./requirements.txt .
RUN pip3 install --no-cache-dir --upgrade -r ./requirements.txt
CMD ["fastapi", "dev", "scanner/main.py", "--port", "80"]

8
scanner/scanner/main.py Normal file
View File

@ -0,0 +1,8 @@
from fastapi import FastAPI
app = FastAPI()
@app.get("/")
async def root():
return {"message": "Hello World"}