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 }, {