Skip to content

Commit 837d218

Browse files
committed
Using gunicorn
1 parent f44151b commit 837d218

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

epiready-backend/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ COPY . .
1818
EXPOSE 5000
1919

2020
# Run the application using Gunicorn with eventlet worker for WebSocket support
21-
CMD ["python", "app.py"]
21+
CMD ["gunicorn", "-k", "eventlet", "-b", "0.0.0.0:5000", "app:app"]

epiready-backend/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,5 @@ def add_security_headers(response):
5858
response.headers['Content-Security-Policy'] = "frame-ancestors 'none';"
5959
return response
6060

61-
if __name__ == '__main__':
61+
if __name__ == '__main__' and os.getenv("FLASK_ENV") == "development":
6262
socketio.run(app, host='0.0.0.0', port=5000, debug=True)

0 commit comments

Comments
 (0)