Skip to content
This repository was archived by the owner on Jan 19, 2023. It is now read-only.

Commit 276430a

Browse files
committed
add waitress
1 parent c32dc5d commit 276430a

File tree

4 files changed

+35
-0
lines changed

4 files changed

+35
-0
lines changed

flask-waitress/Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM python:slim
2+
3+
ENV APP_HOME /app
4+
ENV PORT 8080
5+
ENV PYTHONUNBUFFERED 1
6+
EXPOSE $PORT
7+
WORKDIR $APP_HOME
8+
9+
COPY . .
10+
11+
RUN pip install --upgrade pip
12+
RUN pip install -r requirements.txt
13+
14+
CMD exec waitress-serve --port $PORT app:app

flask-waitress/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Flask + waitress
2+
3+
[![Run on Google Cloud](https://deploy.cloud.run/button.svg)](https://deploy.cloud.run)
4+
5+
Uses [Flask](https://flask.palletsprojects.com/en/1.1.x/) and [waitress](https://docs.pylonsproject.org/projects/waitress/en/latest/).
6+
7+
[![deployment status badge](https://admin-ebpumwrniq-uc.a.run.app/status/flask-waitress.svg)](https://flask-waitress-ebpumwrniq-uc.a.run.app/)

flask-waitress/app.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from flask import Flask
2+
3+
app = Flask(__name__)
4+
5+
6+
@app.route("/")
7+
def hello():
8+
return "👋 Hello flask - waitress"
9+
10+
11+
if __name__ == "__main__":
12+
app.run(host="localhost", port=8080, debug=True)

flask-waitress/requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Flask
2+
waitress

0 commit comments

Comments
 (0)