From 53767505d9c0ef66bc8f9968eaae0ccf4bf2ad5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=BC=D0=B5=D0=BB=D1=8F=D0=BD=D0=B5=D1=86?= Date: Thu, 13 Nov 2025 09:03:59 +0000 Subject: [PATCH] =?UTF-8?q?=D0=B7=D0=B0=D0=B4=D0=B0=D0=BD=D0=B8=D0=B5=201?= =?UTF-8?q?=20=D0=B4=D0=BE=D0=BA=D0=B5=D1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dockerfile | 7 +++++++ main.py | 9 +++++++++ requirements.txt | 1 + 3 files changed, 17 insertions(+) create mode 100644 dockerfile create mode 100644 main.py create mode 100644 requirements.txt diff --git a/dockerfile b/dockerfile new file mode 100644 index 0000000..d39b64a --- /dev/null +++ b/dockerfile @@ -0,0 +1,7 @@ +FROM python:3.12-slim +WORKDIR /app +COPY requirements.txt . +RUN pip install --no-cache-dir -r requirements.txt +COPY . . +EXPOSE 80 +CMD ["python", "main.py"] diff --git a/main.py b/main.py new file mode 100644 index 0000000..d0b9e02 --- /dev/null +++ b/main.py @@ -0,0 +1,9 @@ +from flask import Flask +app = Flask(__name__) + +@app.route('/') +def hello(): + return "Привет из Docker!" + +if __name__ == '__main__': + app.run(debug=True, host='0.0.0.0', port=80) diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..2077213 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +Flask \ No newline at end of file