diff --git a/.github/Dockerfile_nginx_OC b/.github/Dockerfile_nginx_OC index e8c59a9b..c1158087 100644 --- a/.github/Dockerfile_nginx_OC +++ b/.github/Dockerfile_nginx_OC @@ -15,7 +15,7 @@ RUN python ./apimanager/manage.py collectstatic --noinput FROM registry.access.redhat.com/ubi9/nginx-120 USER 0 RUN dnf update -y -ADD .github/apimanager.conf "${NGINX_DEFAULT_CONF_PATH}" +ADD .github/apimanager_oc.conf "${NGINX_DEFAULT_CONF_PATH}" COPY --from=builder /app/apimanager/static /opt/app-root/src RUN chgrp -R 0 /opt/app-root/src/ && chmod -R g+rwX /opt/app-root/src/ USER 1001 diff --git a/.github/apimanager.conf b/.github/apimanager.conf index 132d3d87..233cc730 100644 --- a/.github/apimanager.conf +++ b/.github/apimanager.conf @@ -1,8 +1,4 @@ -server { - listen 8080; - server_name apimanager; - - location / { + location / { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # enable this if and only if you use HTTPS # proxy_set_header X-Forwarded-Proto https; @@ -19,5 +15,4 @@ server { } location /static { alias /usr/share/nginx/html; - } -} \ No newline at end of file + } \ No newline at end of file diff --git a/.github/apimanager_oc.conf b/.github/apimanager_oc.conf new file mode 100644 index 00000000..ee46b753 --- /dev/null +++ b/.github/apimanager_oc.conf @@ -0,0 +1,19 @@ + + location / { + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + # enable this if and only if you use HTTPS + # proxy_set_header X-Forwarded-Proto https; + proxy_set_header Host $http_host; + proxy_redirect off; + proxy_pass http://127.0.0.1:8000; + } + + location /en/static { + alias /opt/app-root/src; + } + location /es/static { + alias /opt/app-root/src; + } + location /static { + alias /opt/app-root/src; + } \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 6a518c85..ffd27af7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,10 +2,10 @@ psycopg2 #Django==1.11.7 Django==2.2.28 oauthlib==3.2.2 -requests==2.31.0 +requests==2.32.3 requests-oauthlib==1.3.1 PyJWT==2.8.0 -gunicorn==19.6.0 +gunicorn==22.0.0 matplotlib django-bootstrap-datepicker-plus==3.0.5 django-mathfilters