Merge pull request #363 from tawoe/latest

Latest
This commit is contained in:
tawoe 2024-10-24 12:04:29 +02:00 committed by GitHub
commit 03a359da3d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 28 additions and 31 deletions

View File

@ -1,5 +1,3 @@
server {
listen 8080;
server_name apimanager; server_name apimanager;
location / { location / {
@ -12,12 +10,11 @@ server {
} }
location /en/static { location /en/static {
alias /usr/share/nginx/html; alias /opt/app-root/src;
} }
location /es/static { location /es/static {
alias /usr/share/nginx/html; alias /opt/app-root/src;
} }
location /static { location /static {
alias /usr/share/nginx/html; alias /opt/app-root/src;
} }
}

View File

@ -5,8 +5,6 @@ RUN pip install -r /app/requirements.txt
WORKDIR /app WORKDIR /app
RUN python ./apimanager/manage.py collectstatic --noinput RUN python ./apimanager/manage.py collectstatic --noinput
FROM nginxinc/nginx-unprivileged:stable FROM nginxinc/nginx-unprivileged:stable
COPY .github/apimanager.conf /etc/nginx/conf.d/ COPY nginx.apimanager.conf /etc/nginx/conf.d/apimanager.conf
COPY --from=builder /app/apimanager/static /usr/share/nginx/html COPY --from=builder /app/apimanager/static /usr/share/nginx/html
CMD nginx -g "daemon off;" CMD nginx -g "daemon off;"

View File

@ -1,21 +1,23 @@
# nginx server configuration for apimanager
server { server {
listen 80 default_server; listen 8080;
listen [::]:80 default_server; server_name apimanager;
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 / { location /en/static {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; alias /usr/share/nginx/html;
# enable this if and only if you use HTTPS }
# proxy_set_header X-Forwarded-Proto https; location /es/static {
proxy_set_header Host $http_host; alias /usr/share/nginx/html;
proxy_redirect off; }
proxy_pass http://127.0.0.1:8000; location /static {
} alias /usr/share/nginx/html;
}
location /static { }
alias /var/www/apimanager/static-collected;
}
}

View File

@ -2,10 +2,10 @@ psycopg2
#Django==1.11.7 #Django==1.11.7
Django==2.2.28 Django==2.2.28
oauthlib==3.2.2 oauthlib==3.2.2
requests==2.31.0 requests==2.32.3
requests-oauthlib==1.3.1 requests-oauthlib==1.3.1
PyJWT==2.8.0 PyJWT==2.8.0
gunicorn==19.6.0 gunicorn==22.0.0
matplotlib matplotlib
django-bootstrap-datepicker-plus==3.0.5 django-bootstrap-datepicker-plus==3.0.5
django-mathfilters django-mathfilters