mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-06-03 05:34:23 -04:00
Init fastapi
This commit is contained in:
parent
f200e63cb2
commit
4321025246
@ -8,5 +8,3 @@ Dockerfile*
|
|||||||
dbc/
|
dbc/
|
||||||
# genereated via swag
|
# genereated via swag
|
||||||
docs/
|
docs/
|
||||||
|
|
||||||
# vim: ft=gitignore
|
|
||||||
|
@ -100,9 +100,12 @@ services:
|
|||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
env_file:
|
env_file:
|
||||||
- ./.env
|
- ./.env
|
||||||
|
ports:
|
||||||
|
- "4389:4389"
|
||||||
environment:
|
environment:
|
||||||
- KYOO_URL=${KYOO_URL:-http://api:3567/api}
|
- KYOO_URL=${KYOO_URL:-http://api:3567/api}
|
||||||
volumes:
|
volumes:
|
||||||
|
- ./scanner:/app
|
||||||
- ${LIBRARY_ROOT}:/video:ro
|
- ${LIBRARY_ROOT}:/video:ro
|
||||||
|
|
||||||
transcoder:
|
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 . .
|
COPY . .
|
||||||
|
|
||||||
CMD ["fastapi", "run", "scanner/main.py", "--port", "80"]
|
CMD ["fastapi", "run", "scanner", "--port", "4389"]
|
||||||
|
@ -4,4 +4,4 @@ WORKDIR /app
|
|||||||
COPY ./requirements.txt .
|
COPY ./requirements.txt .
|
||||||
RUN pip3 install --no-cache-dir --upgrade -r ./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
|
guessit@git+https://github.com/zoriya/guessit
|
||||||
|
fastapi[standard]
|
||||||
|
|
||||||
aiohttp
|
aiohttp
|
||||||
jsons
|
jsons
|
||||||
watchfiles
|
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
|
{pkgs ? import <nixpkgs> {}}: let
|
||||||
python = pkgs.python312.withPackages (ps:
|
python = pkgs.python313.withPackages (ps:
|
||||||
with ps; [
|
with ps; [
|
||||||
|
fastapi
|
||||||
guessit
|
guessit
|
||||||
aiohttp
|
aiohttp
|
||||||
jsons
|
jsons
|
||||||
@ -17,5 +18,6 @@ in
|
|||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
python
|
python
|
||||||
ruff
|
ruff
|
||||||
|
fastapi-cli
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user