diff --git a/app/main.py b/app/main.py index 883688d..94ec997 100644 --- a/app/main.py +++ b/app/main.py @@ -342,8 +342,9 @@ def api_check(model_id: str): @app.get("/", response_class=HTMLResponse) def index(): - with open("/app/static/index.html") as f: + with open("/app/app/static/index.html") as f: return f.read() -app.mount("/static", StaticFiles(directory="/app/static"), name="static") +app.mount("/static", StaticFiles(directory="/app/app/static"), name="static") + diff --git a/entrypoint.sh b/entrypoint.sh index 1f5634b..1350d0e 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,10 +1,9 @@ #!/bin/sh -# Entrypoint: настраиваем cron из переменной CHECK_INTERVAL_HOURS INTERVAL=${CHECK_INTERVAL_HOURS:-3} -# Записываем crontab для probe -echo "0 */$INTERVAL * * * /usr/local/bin/python3 /app/probe.py >> /proc/1/fd/1 2>&1" | crontab - +echo "0 */$INTERVAL * * * /usr/local/bin/python3 /app/app/probe.py >> /proc/1/fd/1 2>&1" | crontab - cron -# Запускаем FastAPI +cd /app/app exec uvicorn main:app --host 0.0.0.0 --port 8000 --workers 1 +