From 5d273884d7077730248d8aa506c144e4b2254ab9 Mon Sep 17 00:00:00 2001 From: Fibe Date: Tue, 7 Apr 2026 07:29:39 +0000 Subject: [PATCH] Initial Flask hello world app --- Dockerfile | 17 +++++++++++++++++ app.py | 12 ++++++++++++ requirements.txt | 1 + 3 files changed, 30 insertions(+) create mode 100644 Dockerfile create mode 100644 app.py create mode 100644 requirements.txt diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3cf273a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM python:3.12-slim + +WORKDIR /app + +COPY requirements.txt . +RUN pip install --no-cache-dir -r requirements.txt + +COPY . . + +ENV FLASK_APP=app.py +ENV FLASK_DEBUG=1 +ENV PYTHONDONTWRITEBYTECODE=1 +ENV PYTHONUNBUFFERED=1 + +EXPOSE 5000 + +CMD ["flask", "run", "--host=0.0.0.0", "--port=5000", "--debug"] diff --git a/app.py b/app.py new file mode 100644 index 0000000..367ed36 --- /dev/null +++ b/app.py @@ -0,0 +1,12 @@ +from flask import Flask + +app = Flask(__name__) + + +@app.route("/") +def hello(): + return "

Hello, World!

" + + +if __name__ == "__main__": + app.run(host="0.0.0.0", port=5000, debug=True) diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..dbcbaf7 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +flask==3.1.0