From a896b4cbb26f1e19638ca4123868bc88f402d638 Mon Sep 17 00:00:00 2001 From: Celestino Rey Date: Wed, 8 Jan 2025 15:58:37 +0100 Subject: [PATCH] =?UTF-8?q?A=C3=B1ado=20Dockerfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 16 ++++++++++++++++ openshift/templates/django.json | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0a68a38 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +FROM registry.fedoraproject.org/f33/python3 + +# Add application sources with correct permissions for OpenShift +USER 0 +ADD app-src . +RUN chown -R 1001:0 ./ +USER 1001 + +# Install the dependencies +RUN pip install -U "pip>=19.3.1" && \ + pip install -r requirements.txt && \ + python manage.py collectstatic --noinput && \ + python manage.py migrate + +# Run the application +CMD python manage.py runserver 0.0.0.0:8080 diff --git a/openshift/templates/django.json b/openshift/templates/django.json index 2fe9e17..746a507 100644 --- a/openshift/templates/django.json +++ b/openshift/templates/django.json @@ -237,7 +237,7 @@ "name": "PYTHON_VERSION", "displayName": "Version of Python Image", "description": "Version of Python image to be used (3.6-ubi8, 3.8-ubi7, 3.8-ubi8, or latest).", - "value": "3.8-ubi8", + "value": "latest", "required": true }, {