Keys commited on
Commit
b40bcaa
·
1 Parent(s): 432353e

Second Commit

Browse files
Files changed (2) hide show
  1. Dockerfile +2 -4
  2. app.py +2 -1
Dockerfile CHANGED
@@ -24,9 +24,7 @@ COPY --chown=user:user . /app
24
  EXPOSE 5000
25
 
26
  # Set the environment variables for Flask
27
- ENV FLASK_APP=app.py \
28
- FLASK_RUN_HOST=0.0.0.0 \
29
- FLASK_RUN_PORT=5000
30
 
31
  # Run the Flask application
32
- CMD ["flask", "run"]
 
24
  EXPOSE 5000
25
 
26
  # Set the environment variables for Flask
27
+ ENV FLASK_APP=app.py
 
 
28
 
29
  # Run the Flask application
30
+ CMD ["flask", "run", "--host=0.0.0.0"]
app.py CHANGED
@@ -47,4 +47,5 @@ def add_cache_headers(response):
47
  return response
48
 
49
  if __name__ == '__main__':
50
- app.run(debug=True, port=8000)
 
 
47
  return response
48
 
49
  if __name__ == '__main__':
50
+ port = int(os.environ.get('PORT', 5000))
51
+ app.run(host='0.0.0.0', port=port, debug=True)