Configure for dokku deployment
This commit is contained in:
7
app.py
7
app.py
@@ -1,3 +1,4 @@
|
|||||||
|
import os
|
||||||
from flask import Flask, render_template, redirect, request, url_for
|
from flask import Flask, render_template, redirect, request, url_for
|
||||||
from flasgger import Swagger, swag_from
|
from flasgger import Swagger, swag_from
|
||||||
|
|
||||||
@@ -109,3 +110,9 @@ def my_utility_processor():
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
return dict(get_list_of_people_and_workout_count=get_list_of_people_and_workout_count, is_selected_page=is_selected_page, get_first_element_from_list_with_matching_attribute=get_first_element_from_list_with_matching_attribute)
|
return dict(get_list_of_people_and_workout_count=get_list_of_people_and_workout_count, is_selected_page=is_selected_page, get_first_element_from_list_with_matching_attribute=get_first_element_from_list_with_matching_attribute)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
# Bind to PORT if defined, otherwise default to 5000.
|
||||||
|
port = int(os.environ.get('PORT', 5000))
|
||||||
|
app.run(host='127.0.0.1', port=port)
|
||||||
|
|||||||
4
requirements.txt
Normal file
4
requirements.txt
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
Flask==2.0.1
|
||||||
|
gunicorn==19.7.1
|
||||||
|
Jinja2==3.0.1
|
||||||
|
flasgger==0.9.5
|
||||||
Reference in New Issue
Block a user