From 9ff4084afcf102442309d14a7cf675231bdfaaab Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 May 2023 03:35:51 +0000 Subject: [PATCH 1/2] Bump requests from 2.27.1 to 2.31.0 Bumps [requests](https://github.com/psf/requests) from 2.27.1 to 2.31.0. - [Release notes](https://github.com/psf/requests/releases) - [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md) - [Commits](https://github.com/psf/requests/compare/v2.27.1...v2.31.0) --- updated-dependencies: - dependency-name: requests dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index f1d6477..3dee77d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ #Django==1.11.7 Django==2.2.28 oauthlib==3.2.2 -requests==2.27.1 +requests==2.31.0 requests-oauthlib==1.3.1 PyJWT==1.5.3 gunicorn==19.6.0 From 9cb13e9c19095c607b9b5bd1388a4f9483885e99 Mon Sep 17 00:00:00 2001 From: karmaking Date: Wed, 16 Oct 2024 14:16:39 +0200 Subject: [PATCH 2/2] fixed pipeline --- .github/apimanager.conf | 18 +++++++----------- Dockerfile | 3 --- Dockerfile_nginx | 16 +++------------- 3 files changed, 10 insertions(+), 27 deletions(-) diff --git a/.github/apimanager.conf b/.github/apimanager.conf index aade1e8..132d3d8 100644 --- a/.github/apimanager.conf +++ b/.github/apimanager.conf @@ -1,9 +1,6 @@ -#http { -# server { -# listen 8080 default_server; -# listen [::]:8080 default_server; - - server_name apimanager; +server { + listen 8080; + server_name apimanager; location / { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -15,13 +12,12 @@ } location /en/static { - alias /opt/app-root/src; + alias /usr/share/nginx/html; } location /es/static { - alias /opt/app-root/src; + alias /usr/share/nginx/html; } location /static { - alias /opt/app-root/src; + alias /usr/share/nginx/html; } -# } -#} +} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 81e20c0..dcc2d0f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,10 @@ FROM python:3.10 -USER root COPY . /app COPY .github/local_settings_container.py /app/apimanager/apimanager/local_settings.py COPY .github/gunicorn.conf.py /app/gunicorn.conf.py RUN pip install -r /app/requirements.txt WORKDIR /app RUN ./apimanager/manage.py migrate -RUN chgrp -R 0 /app && chmod -R g+rwX /app -USER 501 WORKDIR /app/apimanager EXPOSE 8000 CMD ["gunicorn", "--bind", ":8000", "--config", "../gunicorn.conf.py", "apimanager.wsgi"] \ No newline at end of file diff --git a/Dockerfile_nginx b/Dockerfile_nginx index fcdc3ae..ea98ff7 100644 --- a/Dockerfile_nginx +++ b/Dockerfile_nginx @@ -1,22 +1,12 @@ FROM python:3.10 AS builder -USER 0 COPY . /app RUN cp /app/.github/local_settings_container.py /app/apimanager/apimanager/local_settings.py RUN pip install -r /app/requirements.txt -RUN chown 501 / -RUN chown -R 501 /app -RUN chgrp -R 0 /app && chmod -R g+rwX /app -USER 1001 WORKDIR /app RUN python ./apimanager/manage.py collectstatic --noinput - -FROM nginx:mainline-alpine -USER 0 -#RUN dnf update -y -ADD .github/apimanager.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 +FROM nginxinc/nginx-unprivileged:stable +COPY .github/apimanager.conf /etc/nginx/conf.d/ +COPY --from=builder /app/apimanager/static /usr/share/nginx/html CMD nginx -g "daemon off;"