Futuresony commited on
Commit
eecc40d
·
verified ·
1 Parent(s): de336e1

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -2
Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- FROM python:3.10
2
  # Use a Python version compatible with your packages
3
 
4
  WORKDIR /app
@@ -17,4 +17,5 @@ COPY app.py .
17
  # Command to run your Flask application using a production-ready WSGI server like Gunicorn
18
  # This assumes your Flask application instance is named 'app' in 'app.py'
19
  # It binds to the PORT environment variable provided by the hosting environment.
20
- CMD exec gunicorn --bind 0.0.0.0:$PORT --workers 1 --threads 8 --timeout 0 app:app
 
 
1
+ FROM python:3.10
2
  # Use a Python version compatible with your packages
3
 
4
  WORKDIR /app
 
17
  # Command to run your Flask application using a production-ready WSGI server like Gunicorn
18
  # This assumes your Flask application instance is named 'app' in 'app.py'
19
  # It binds to the PORT environment variable provided by the hosting environment.
20
+ # Provide a default port (e.g., 7860) if the PORT environment variable is not set.
21
+ CMD exec gunicorn --bind 0.0.0.0:${PORT:-7860} --workers 1 --threads 8 --timeout 0 app:app