15 lines
491 B
Python
15 lines
491 B
Python
"""
|
|
WSGI entry point for running DigiServer v2 via gunicorn outside Docker.
|
|
Ensures the project directory is on sys.path before importing the app factory.
|
|
"""
|
|
import sys
|
|
import os
|
|
|
|
# Add the project root to sys.path so `from app.app import create_app` works
|
|
# when gunicorn is invoked from a different directory.
|
|
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
|
|
|
from app.app import create_app # noqa: E402
|
|
|
|
application = create_app(os.environ.get('FLASK_ENV', 'production'))
|