From a03df1bb13c14bc466e8e75383439dc9963c674d Mon Sep 17 00:00:00 2001 From: tawoe Date: Wed, 16 Oct 2024 17:44:53 +0200 Subject: [PATCH 1/4] update requirements.txt --- requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index d1794813..455a4f5d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,11 +1,11 @@ -psycopg2 +psycopg2-binary #Django==1.11.7 Django==2.2.28 oauthlib==3.2.2 -requests==2.27.1 +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 From 714bd27f0b67f73837890765ca083d53bc17a22a Mon Sep 17 00:00:00 2001 From: tawoe Date: Wed, 23 Oct 2024 14:22:56 +0200 Subject: [PATCH 2/4] fix container nginx conf --- .github/Dockerfile_nginx_OC | 2 +- .github/apimanager.conf | 6 ++---- .github/apimanager_oc.conf | 20 ++++++++++++++++++++ 3 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 .github/apimanager_oc.conf 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..44b11cb5 100644 --- a/.github/apimanager.conf +++ b/.github/apimanager.conf @@ -1,5 +1,4 @@ -server { - listen 8080; + server_name apimanager; location / { @@ -19,5 +18,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..d3618835 --- /dev/null +++ b/.github/apimanager_oc.conf @@ -0,0 +1,20 @@ + + server_name apimanager; + + 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 From 48cb2e994ced2b29cadaffaeefcb5b768d3d9b28 Mon Sep 17 00:00:00 2001 From: tawoe Date: Wed, 23 Oct 2024 15:07:23 +0200 Subject: [PATCH 3/4] debug nginx.conf --- .github/apimanager.conf | 5 +---- .github/apimanager_oc.conf | 2 -- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/apimanager.conf b/.github/apimanager.conf index 44b11cb5..233cc730 100644 --- a/.github/apimanager.conf +++ b/.github/apimanager.conf @@ -1,7 +1,4 @@ - - 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; diff --git a/.github/apimanager_oc.conf b/.github/apimanager_oc.conf index d3618835..6d24dbd4 100644 --- a/.github/apimanager_oc.conf +++ b/.github/apimanager_oc.conf @@ -1,6 +1,4 @@ - server_name apimanager; - location / { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # enable this if and only if you use HTTPS From 612487f5715638aaf80338bc91a09e1d9c47fdb1 Mon Sep 17 00:00:00 2001 From: tawoe Date: Wed, 23 Oct 2024 15:31:04 +0200 Subject: [PATCH 4/4] debug nginx.conf --- .github/apimanager_oc.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/apimanager_oc.conf b/.github/apimanager_oc.conf index 6d24dbd4..ee46b753 100644 --- a/.github/apimanager_oc.conf +++ b/.github/apimanager_oc.conf @@ -15,4 +15,5 @@ alias /opt/app-root/src; } location /static { - alias /opt/app-root/src; \ No newline at end of file + alias /opt/app-root/src; + } \ No newline at end of file