mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Init fastapi
This commit is contained in:
parent
f200e63cb2
commit
4321025246
@ -8,5 +8,3 @@ Dockerfile*
|
||||
dbc/
|
||||
# genereated via swag
|
||||
docs/
|
||||
|
||||
# vim: ft=gitignore
|
||||
|
@ -100,9 +100,12 @@ services:
|
||||
condition: service_healthy
|
||||
env_file:
|
||||
- ./.env
|
||||
ports:
|
||||
- "4389:4389"
|
||||
environment:
|
||||
- KYOO_URL=${KYOO_URL:-http://api:3567/api}
|
||||
volumes:
|
||||
- ./scanner:/app
|
||||
- ${LIBRARY_ROOT}:/video:ro
|
||||
|
||||
transcoder:
|
||||
|
@ -1,2 +1,5 @@
|
||||
Dockerfile*
|
||||
**
|
||||
!/requirements.txt
|
||||
!scanner/**.py
|
||||
|
||||
|
||||
|
@ -6,4 +6,4 @@ RUN pip3 install --no-cache-dir --upgrade -r ./requirements.txt
|
||||
|
||||
COPY . .
|
||||
|
||||
CMD ["fastapi", "run", "scanner/main.py", "--port", "80"]
|
||||
CMD ["fastapi", "run", "scanner", "--port", "4389"]
|
||||
|
@ -4,4 +4,4 @@ WORKDIR /app
|
||||
COPY ./requirements.txt .
|
||||
RUN pip3 install --no-cache-dir --upgrade -r ./requirements.txt
|
||||
|
||||
CMD ["fastapi", "dev", "scanner/main.py", "--port", "80"]
|
||||
CMD ["fastapi", "dev", "scanner", "--host", "0.0.0.0", "--port", "4389"]
|
||||
|
@ -1,4 +1,6 @@
|
||||
guessit@git+https://github.com/zoriya/guessit
|
||||
fastapi[standard]
|
||||
|
||||
aiohttp
|
||||
jsons
|
||||
watchfiles
|
||||
|
8
scanner/scanner/__init__.py
Normal file
8
scanner/scanner/__init__.py
Normal file
@ -0,0 +1,8 @@
|
||||
from fastapi import FastAPI
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
|
||||
@app.get("/items/{item_id}")
|
||||
async def read_item(item_id):
|
||||
return {"item_id": item_id}
|
@ -1,8 +0,0 @@
|
||||
from fastapi import FastAPI
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
|
||||
@app.get("/")
|
||||
async def root():
|
||||
return {"message": "Hello World"}
|
@ -1,6 +1,7 @@
|
||||
{pkgs ? import <nixpkgs> {}}: let
|
||||
python = pkgs.python312.withPackages (ps:
|
||||
python = pkgs.python313.withPackages (ps:
|
||||
with ps; [
|
||||
fastapi
|
||||
guessit
|
||||
aiohttp
|
||||
jsons
|
||||
@ -17,5 +18,6 @@ in
|
||||
packages = with pkgs; [
|
||||
python
|
||||
ruff
|
||||
fastapi-cli
|
||||
];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user