From ffad4dfd8db02db433aa623cd70880e62a7cf0c5 Mon Sep 17 00:00:00 2001 From: Kunthawat Greethong Date: Fri, 28 Aug 2026 20:11:19 +0700 Subject: [PATCH] fix(deploy): pin Flask to 5000 so it does not clash with nginx on EasyPanel PORT=80 --- deploy/entrypoint.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/deploy/entrypoint.sh b/deploy/entrypoint.sh index 762773d..ea57438 100644 --- a/deploy/entrypoint.sh +++ b/deploy/entrypoint.sh @@ -4,9 +4,14 @@ set -e # Start the Flask backend on 0.0.0.0:5000 (bind all interfaces so nginx can # proxy to it inside the container). DATA_DIR is /app/backend/data by default # (a mounted volume makes it survive container recreate). +# +# NOTE: nginx owns port 80 (the inbound entrypoint EasyPanel exposes). We +# therefore pin Flask to 5000 explicitly and IGNORE the PORT env var — EasyPanel +# injects PORT=80, and if Flask also took 80 it would clash with nginx +# ("Address already in use"). nginx proxies /api -> 127.0.0.1:5000. cd /app/backend export HOST="${HOST:-0.0.0.0}" -export PORT="${PORT:-5000}" +export PORT="5000" export PAPER_BIND_HOST="$HOST" # pid1 helper: run nginx in foreground + Flask subprocess so the container