From 7d51e3f637de5735e36b1dea4ac5db4b17c762bf Mon Sep 17 00:00:00 2001 From: Erik M Jacobs Date: Wed, 26 Apr 2023 14:43:09 -0400 Subject: [PATCH] S2I-ify --- Containerfile | 14 ++++++++++++++ gunicorn_config.py => app-src/gunicorn_config.py | 0 requirements.txt => app-src/requirements.txt | 0 wsgi.py => app-src/wsgi.py | 0 4 files changed, 14 insertions(+) create mode 100644 Containerfile rename gunicorn_config.py => app-src/gunicorn_config.py (100%) rename requirements.txt => app-src/requirements.txt (100%) rename wsgi.py => app-src/wsgi.py (100%) diff --git a/Containerfile b/Containerfile new file mode 100644 index 0000000..0ca56ed --- /dev/null +++ b/Containerfile @@ -0,0 +1,14 @@ +FROM registry.access.redhat.com/ubi8/python-39 + +# Add application sources to a directory that the assemble script expects them +# and set permissions so that the container runs without root access +USER 0 +ADD app-src /tmp/src +RUN /usr/bin/fix-permissions /tmp/src +USER 1001 + +# Install the dependencies +RUN /usr/libexec/s2i/assemble + +# Set the default command for the resulting image +CMD /usr/libexec/s2i/run \ No newline at end of file diff --git a/gunicorn_config.py b/app-src/gunicorn_config.py similarity index 100% rename from gunicorn_config.py rename to app-src/gunicorn_config.py diff --git a/requirements.txt b/app-src/requirements.txt similarity index 100% rename from requirements.txt rename to app-src/requirements.txt diff --git a/wsgi.py b/app-src/wsgi.py similarity index 100% rename from wsgi.py rename to app-src/wsgi.py