diff --git a/Dockerfile b/Dockerfile index eccb237..379e34c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:2.7.18 +FROM python:3.9 EXPOSE 5000 @@ -14,4 +14,4 @@ RUN pip install -r requirements.txt ADD . /app/ -CMD ["python", "app.py"] \ No newline at end of file +CMD ["python3", "app.py"] \ No newline at end of file diff --git a/Procfile b/Procfile index 2e35818..ab678e0 100644 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -web: python app.py +web: python3 app.py \ No newline at end of file diff --git a/README.md b/README.md index 756bb1e..04d09f2 100644 --- a/README.md +++ b/README.md @@ -11,10 +11,10 @@ However, it is still functional with the `scalingo-18` stack. ## Run Locally ```shell -virtualenv -. bin/activate +python3 -m venv venv +. venv/bin/activate pip install -r requirements.txt -python app.py +python3 app.py ``` ## Deploy via Git @@ -32,4 +32,4 @@ The application is running at this URL: https://.osc-fr1.scali ## Deploy via one-click -[![Deploy to Scalingo](https://cdn.scalingo.com/deploy/button.svg)](https://my.scalingo.com/deploy) +[![Deploy to Scalingo](https://cdn.scalingo.com/deploy/button.svg)](https://my.scalingo.com/deploy) \ No newline at end of file diff --git a/app.py b/app.py index e4a353f..b416ae7 100644 --- a/app.py +++ b/app.py @@ -9,8 +9,8 @@ def hello(): return render_template('index.html') if __name__ == "__main__": - print "Running app" + print("Running app") port = int(os.environ.get("PORT", 5000)) - if port <> 5000: - print "Using non-standard port %d" % port - app.run(host='0.0.0.0', port=port) + if port != 5000: + print("Using non-standard port %d" % port) + app.run(host='0.0.0.0', port=port) \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 08e279b..25b2134 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ -Click==7.0 -Flask==1.0.2 -itsdangerous==1.1.0 -Jinja2==2.11.3 -MarkupSafe==1.1.1 -Werkzeug==0.15.3 +Click==8.0.1 +Flask==2.0.1 +itsdangerous==2.0.1 +Jinja2==3.0.1 +MarkupSafe==2.0.1 +Werkzeug==2.0.1 \ No newline at end of file diff --git a/runtime.txt b/runtime.txt index d42956d..333d904 100644 --- a/runtime.txt +++ b/runtime.txt @@ -1 +1 @@ -python-2.7.16 +python-3.10.0 \ No newline at end of file