mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-06-23 15:30:34 -04:00
Init scanner with fastapi
This commit is contained in:
parent
ae9bfcfd41
commit
b3d8ffc89d
@ -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
7
scanner/Dockerfile.dev
Normal 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
8
scanner/scanner/main.py
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
from fastapi import FastAPI
|
||||||
|
|
||||||
|
app = FastAPI()
|
||||||
|
|
||||||
|
|
||||||
|
@app.get("/")
|
||||||
|
async def root():
|
||||||
|
return {"message": "Hello World"}
|
Loading…
x
Reference in New Issue
Block a user