upgrade for Evo.Gateway

This commit is contained in:
vchikalkin 2023-11-01 09:26:42 +03:00
parent 937ae35c08
commit 0fcafeeb46
3 changed files with 22 additions and 68 deletions

View File

@ -17,6 +17,5 @@ services:
networks:
internal_network:
name: internal_network
web:
external: true
external:
name: internal_network

View File

@ -1,15 +0,0 @@
version: '3'
services:
server:
container_name: ${TRAEFIK_APP_NAME}
labels:
- 'traefik.enable=true'
- 'traefik.backend=${TRAEFIK_APP_NAME}'
- 'traefik.docker.network=web'
- 'traefik.http.routers.${TRAEFIK_APP_NAME}.rule=Host(`${WEB_HOST}`)'
- 'traefik.http.routers.${TRAEFIK_APP_NAME}.entrypoints=web-secure'
- 'traefik.http.routers.${TRAEFIK_APP_NAME}.tls.certresolver=le'
- 'traefik.port=80'
networks:
- web

View File

@ -1,67 +1,37 @@
upstream auth_server {
server auth_server:80;
server auth_server:80;
}
server {
listen 80;
listen 80;
gzip on;
gzip_min_length 1000;
gzip_proxied any;
gzip_comp_level 1;
gzip_types text/css text/javascript text/xml text/plain text/x-component application/javascript application/json application/xml application/rss+xml font/truetype font/opentype application/vnd.ms-fontobject image/svg+xml;
gzip_vary on;
gzip_disable "msie6";
gzip on;
gzip_min_length 1000;
gzip_proxied any;
gzip_comp_level 1;
gzip_types text/css text/javascript text/xml text/plain text/x-component application/javascript application/json application/xml application/rss+xml font/truetype font/opentype application/vnd.ms-fontobject image/svg+xml;
gzip_vary on;
gzip_disable "msie6";
include /etc/nginx/mime.types;
include /etc/nginx/mime.types;
# AUTHENTICATION
error_page 401 @error401;
location @error401 {
add_header Cache-Control 'no-store, no-cache';
# rewrite ^ /login?uri=$request_uri permanent;
rewrite ^ /login permanent;
}
location / {
auth_request /auth;
# kill cache
add_header Last-Modified $date_gmt;
add_header Cache-Control 'no-store, no-cache';
if_modified_since off;
expires off;
etag off;
# kill cache
add_header Last-Modified $date_gmt;
add_header Cache-Control 'no-store, no-cache';
if_modified_since off;
expires off;
etag off;
root /usr/share/nginx/html;
try_files $uri $uri/ /index.html =404;
}
location = /auth {
internal;
proxy_pass http://auth_server;
proxy_pass_request_body off;
proxy_set_header Content-Length "";
proxy_set_header X-Original-URI $request_uri;
proxy_set_header X-Original-Remote-Addr $remote_addr;
proxy_set_header X-Original-Host $host;
}
location ~ ^/(login|signin|logout|get-user) {
proxy_pass http://auth_server;
root /usr/share/nginx/html;
try_files $uri $uri/ /index.html =404;
}
location /download {
auth_request /auth;
proxy_pass $URL_DOWNLOAD;
}
location = /health {
access_log off;
add_header 'Content-Type' 'application/json';
return 200 'UP';
auth_request /auth;
proxy_pass $URL_DOWNLOAD;
}
}