diff --git a/app.py b/app.py index 0e5cd01..e770230 100644 --- a/app.py +++ b/app.py @@ -229,4 +229,4 @@ app = create_app() if __name__ == '__main__': # This allows running the app directly with python app.py # In production, use gunicorn or other WSGI servers - app.run(host='0.0.0.0', port=5000, debug=app.config['DEBUG']) + app.run(host='0.0.0.0', port=int(os.environ.get('PORT', 5000)), debug=app.config['DEBUG']) diff --git a/docker-compose.yml b/docker-compose.yml index 2785942..0754af1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,7 @@ services: dockerfile: Dockerfile container_name: formeleon-app ports: - - "5000:5000" + - "${PORT:-5000}:5000" volumes: # Mount entire project directory for hot-reload in development # Exclude the virtual environment if it exists locally to prevent conflicts with container venv