From 8f4d01d34dba9a69cb92e9fcd7a4125e1b1e1334 Mon Sep 17 00:00:00 2001 From: zwitschi Date: Mon, 27 Apr 2026 21:18:55 +0200 Subject: [PATCH] Update Coolify deployment guide to clarify production and development dependencies; refactor import statements for consistency and add requirements-dev.txt for development dependencies. Co-authored-by: Copilot --- docs/deployment/coolify.md | 2 ++ frontend/app/main.py | 2 +- frontend/requirements-dev.txt | 2 ++ frontend/tests/test_frontend.py | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 frontend/requirements-dev.txt diff --git a/docs/deployment/coolify.md b/docs/deployment/coolify.md index 966f131..a092849 100644 --- a/docs/deployment/coolify.md +++ b/docs/deployment/coolify.md @@ -65,6 +65,8 @@ Add these as **Runtime** environment variables in Coolify: ``` 8. Click **Create Resource** +> **Note:** The frontend uses `requirements.txt` for production dependencies and `requirements-dev.txt` for development dependencies (like pytest). Nixpacks will automatically detect and install only the production dependencies. + > **Important:** Nixpacks copies the **contents** of the Base Directory to `/app/` in the container. When Base Directory is `/frontend`, the `frontend/` folder wrapper is removed — only `app/`, `tests/`, and `requirements.txt` are copied. Therefore the start command uses `app.main:app` (not `frontend.app.main:app`). ### Frontend Environment Variables diff --git a/frontend/app/main.py b/frontend/app/main.py index b1da228..88a1c75 100644 --- a/frontend/app/main.py +++ b/frontend/app/main.py @@ -13,7 +13,7 @@ from flask import ( url_for, ) -from frontend.app.config import Config +from .config import Config app = Flask(__name__) app.config.from_object(Config) diff --git a/frontend/requirements-dev.txt b/frontend/requirements-dev.txt new file mode 100644 index 0000000..1d6ed5c --- /dev/null +++ b/frontend/requirements-dev.txt @@ -0,0 +1,2 @@ +pytest +pytest-mock \ No newline at end of file diff --git a/frontend/tests/test_frontend.py b/frontend/tests/test_frontend.py index f98cd54..23b8568 100644 --- a/frontend/tests/test_frontend.py +++ b/frontend/tests/test_frontend.py @@ -6,7 +6,7 @@ from unittest.mock import MagicMock, patch os.environ.setdefault("FLASK_SECRET_KEY", "test-secret") os.environ.setdefault("BACKEND_URL", "http://backend-mock") -from frontend.app.main import app # noqa: E402 +from app.main import app # noqa: E402 @pytest.fixture