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 <copilot@github.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
pytest
|
||||
pytest-mock
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user