From 8c25a1dbe15ebe2c50279a14aa97051de40e9dd1 Mon Sep 17 00:00:00 2001 From: ai_coder Date: Fri, 16 Oct 2026 14:16:49 +0000 Subject: [PATCH] fix: entrypoint workdir and static path --- app/main.py | 5 +++-- entrypoint.sh | 7 +++---- 2 files changed, 6 insertions(+), 6 deletions(-) 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 +