Initial Flask hello world app

This commit is contained in:
Fibe 2026-04-07 07:29:39 +00:00
commit 5d273884d7
3 changed files with 30 additions and 0 deletions

17
Dockerfile Normal file
View File

@ -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"]

12
app.py Normal file
View File

@ -0,0 +1,12 @@
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "<h1>Hello, World!</h1>"
if __name__ == "__main__":
app.run(host="0.0.0.0", port=5000, debug=True)

1
requirements.txt Normal file
View File

@ -0,0 +1 @@
flask==3.1.0