From 2746f981afda45a4778eb9c8d91d6b00f1d811cd Mon Sep 17 00:00:00 2001 From: orohi Date: Tue, 28 Jul 2026 11:59:43 +0300 Subject: [PATCH] Simplify Docker CMD to uvicorn directly (v2.5.10). Co-authored-by: Cursor --- .gitattributes | 1 + Dockerfile | 3 +-- README.md | 3 +++ app.py | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..dfdb8b7 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.sh text eol=lf diff --git a/Dockerfile b/Dockerfile index 915049c..43b72ed 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,11 +20,10 @@ COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY . . -RUN chmod +x scripts/docker-entrypoint.sh EXPOSE 5000 HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \ CMD curl -fsS "http://127.0.0.1:5000/health" >/dev/null || exit 1 -ENTRYPOINT ["/app/scripts/docker-entrypoint.sh"] +CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "5000", "--proxy-headers", "--forwarded-allow-ips", "*"] diff --git a/README.md b/README.md index b5be320..9290c86 100644 --- a/README.md +++ b/README.md @@ -254,6 +254,9 @@ GitHub Actions workflows in `.github/workflows/`: ## 📋 Fix / changelog (this fork) +### v2.5.10 +* **Docker startup** — run `uvicorn` directly in `CMD` (no shell entrypoint); rebuild required after deploy. + ### v2.5.9 * **Remove move connections between servers** — feature rolled back; fixes startup crash (`ToggleConnectionRequest` was missing after v2.5.4). diff --git a/app.py b/app.py index 4e04c53..8edf399 100644 --- a/app.py +++ b/app.py @@ -103,7 +103,7 @@ else: application_path = os.path.dirname(__file__) DATA_FILE = os.path.join(application_path, 'data.json') # legacy JSON; used only for one-shot import / export -CURRENT_VERSION = "v2.5.9" +CURRENT_VERSION = "v2.5.10" RELEASES_REPO_URL = repo_url() RELEASES_API_LATEST = api_latest_url() BIN_DIR = os.environ.get('TUNNEL_BIN_DIR', os.path.join(application_path, 'bin'))