mirror of
https://github.com/OpenBankProject/API-Manager.git
synced 2026-02-06 09:26:49 +00:00
fixed pipeline
This commit is contained in:
parent
493dac700a
commit
9cb13e9c19
18
.github/apimanager.conf
vendored
18
.github/apimanager.conf
vendored
@ -1,9 +1,6 @@
|
|||||||
#http {
|
server {
|
||||||
# server {
|
listen 8080;
|
||||||
# listen 8080 default_server;
|
server_name apimanager;
|
||||||
# listen [::]:8080 default_server;
|
|
||||||
|
|
||||||
server_name apimanager;
|
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
@ -15,13 +12,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
location /en/static {
|
location /en/static {
|
||||||
alias /opt/app-root/src;
|
alias /usr/share/nginx/html;
|
||||||
}
|
}
|
||||||
location /es/static {
|
location /es/static {
|
||||||
alias /opt/app-root/src;
|
alias /usr/share/nginx/html;
|
||||||
}
|
}
|
||||||
location /static {
|
location /static {
|
||||||
alias /opt/app-root/src;
|
alias /usr/share/nginx/html;
|
||||||
}
|
}
|
||||||
# }
|
}
|
||||||
#}
|
|
||||||
@ -1,13 +1,10 @@
|
|||||||
FROM python:3.10
|
FROM python:3.10
|
||||||
USER root
|
|
||||||
COPY . /app
|
COPY . /app
|
||||||
COPY .github/local_settings_container.py /app/apimanager/apimanager/local_settings.py
|
COPY .github/local_settings_container.py /app/apimanager/apimanager/local_settings.py
|
||||||
COPY .github/gunicorn.conf.py /app/gunicorn.conf.py
|
COPY .github/gunicorn.conf.py /app/gunicorn.conf.py
|
||||||
RUN pip install -r /app/requirements.txt
|
RUN pip install -r /app/requirements.txt
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN ./apimanager/manage.py migrate
|
RUN ./apimanager/manage.py migrate
|
||||||
RUN chgrp -R 0 /app && chmod -R g+rwX /app
|
|
||||||
USER 501
|
|
||||||
WORKDIR /app/apimanager
|
WORKDIR /app/apimanager
|
||||||
EXPOSE 8000
|
EXPOSE 8000
|
||||||
CMD ["gunicorn", "--bind", ":8000", "--config", "../gunicorn.conf.py", "apimanager.wsgi"]
|
CMD ["gunicorn", "--bind", ":8000", "--config", "../gunicorn.conf.py", "apimanager.wsgi"]
|
||||||
@ -1,22 +1,12 @@
|
|||||||
FROM python:3.10 AS builder
|
FROM python:3.10 AS builder
|
||||||
USER 0
|
|
||||||
COPY . /app
|
COPY . /app
|
||||||
RUN cp /app/.github/local_settings_container.py /app/apimanager/apimanager/local_settings.py
|
RUN cp /app/.github/local_settings_container.py /app/apimanager/apimanager/local_settings.py
|
||||||
RUN pip install -r /app/requirements.txt
|
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
|
WORKDIR /app
|
||||||
RUN python ./apimanager/manage.py collectstatic --noinput
|
RUN python ./apimanager/manage.py collectstatic --noinput
|
||||||
|
FROM nginxinc/nginx-unprivileged:stable
|
||||||
FROM nginx:mainline-alpine
|
COPY .github/apimanager.conf /etc/nginx/conf.d/
|
||||||
USER 0
|
COPY --from=builder /app/apimanager/static /usr/share/nginx/html
|
||||||
#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
|
|
||||||
CMD nginx -g "daemon off;"
|
CMD nginx -g "daemon off;"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user