Bump PORT recovery with other environment vars
This commit is contained in:
parent
fd63fbe9b9
commit
1b205e4b1d
1 changed files with 5 additions and 4 deletions
9
app.py
9
app.py
|
@ -5,6 +5,10 @@ from icalendar.cal import Calendar, Component
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
|
||||||
|
PORT = int(os.environ.get('PORT', 5000))
|
||||||
|
|
||||||
|
BASE_URL = os.environ.get('BASE_URL', None)
|
||||||
|
|
||||||
EXCLUDED_COURSES = os.environ.get('COURSES', '').split(',')
|
EXCLUDED_COURSES = os.environ.get('COURSES', '').split(',')
|
||||||
EXCLUDED_TYPES = os.environ.get('TYPES', '').split(',')
|
EXCLUDED_TYPES = os.environ.get('TYPES', '').split(',')
|
||||||
|
|
||||||
|
@ -13,8 +17,6 @@ GROUP = os.environ.get('GROUP', '1')
|
||||||
ALLOWED_YEARS = os.environ.get('ALLOWED_YEARS', '3,4,5').split(',')
|
ALLOWED_YEARS = os.environ.get('ALLOWED_YEARS', '3,4,5').split(',')
|
||||||
ALLOWED_GROUPS = os.environ.get('ALLOWED_GROUPS', '1,2,3').split(',')
|
ALLOWED_GROUPS = os.environ.get('ALLOWED_GROUPS', '1,2,3').split(',')
|
||||||
|
|
||||||
BASE_URL = os.environ.get('BASE_URL', None)
|
|
||||||
|
|
||||||
|
|
||||||
@app.route("/")
|
@app.route("/")
|
||||||
def hello():
|
def hello():
|
||||||
|
@ -92,5 +94,4 @@ def should_add(event):
|
||||||
and course_type not in excluded_types
|
and course_type not in excluded_types
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
port = int(os.environ.get('PORT', 5000))
|
app.run('0.0.0.0', PORT)
|
||||||
app.run('0.0.0.0', port)
|
|
||||||
|
|
Loading…
Reference in a new issue