diff --git a/.python-version b/.python-version new file mode 100644 index 000000000..b6d8b7612 --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.11.8 diff --git a/app/app.py b/app/app.py new file mode 100644 index 000000000..67e0180c0 --- /dev/null +++ b/app/app.py @@ -0,0 +1,14 @@ +import os + +from flask import Flask + +app = Flask(__name__) + + +@app.route("/") +def hello_world(): + return "Hello, World!" + + +if __name__ == "__main__": + app.run(port=os.environ.get("PORT", 3000), host="0.0.0.0") diff --git a/dockerfile b/dockerfile new file mode 100644 index 000000000..96f47f05c --- /dev/null +++ b/dockerfile @@ -0,0 +1,20 @@ +FROM ubuntu:24.04 +WORKDIR /app +COPY --chown=user1 requirements.txt ./ + +# no need to have " / " + +RUN useradd user1 +apt-get update && \ +apt-get upgrade -y && \ +apt-get install -y \ +python3 \ +python3-pip + + +RUN pip install --break-system-packages -r requirements.txt + +COPY --chown=user1 app/ /app + +# EXPOSE 5000 +CMD ["python3" , "-m" ,"flask" , "run" , "--host=0.0.0.0" ] diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 000000000..b5ba78cca --- /dev/null +++ b/requirements.txt @@ -0,0 +1,9 @@ +blinker==1.6.3 ; python_version >= "3.10" and python_version < "4.0" +click==8.1.7 ; python_version >= "3.10" and python_version < "4.0" +colorama==0.4.6 ; python_version >= "3.10" and python_version < "4.0" and platform_system == "Windows" +flask==3.0.0 ; python_version >= "3.10" and python_version < "4.0" +itsdangerous==2.1.2 ; python_version >= "3.10" and python_version < "4.0" +jinja2==3.1.2 ; python_version >= "3.10" and python_version < "4.0" +markupsafe==2.1.3 ; python_version >= "3.10" and python_version < "4.0" +werkzeug==3.0.0 ; python_version >= "3.10" and python_version < "4.0" +