fix build
This commit is contained in:
parent
520e535e47
commit
ceb9d429ce
@ -1,4 +1,4 @@
|
|||||||
version: '3'
|
version: "3"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
internal_server:
|
internal_server:
|
||||||
@ -10,15 +10,19 @@ services:
|
|||||||
- URL_DOWNLOAD=${URL_DOWNLOAD}
|
- URL_DOWNLOAD=${URL_DOWNLOAD}
|
||||||
networks:
|
networks:
|
||||||
- internal_network
|
- internal_network
|
||||||
|
- web
|
||||||
labels:
|
labels:
|
||||||
- 'traefik.enable=true'
|
- "traefik.enable=true"
|
||||||
- 'traefik.backend=proxy'
|
- "traefik.backend=proxy"
|
||||||
- 'traefik.docker.network=web'
|
- "traefik.docker.network=web"
|
||||||
- 'traefik.http.routers.proxy.rule=Host(`${WEB_HOST}`)'
|
- "traefik.http.routers.proxy.rule=Host(`${WEB_HOST}`)"
|
||||||
- 'traefik.http.routers.proxy.entrypoints=web-secure'
|
- "traefik.http.routers.proxy.entrypoints=web-secure"
|
||||||
- 'traefik.http.routers.proxy.tls.certresolver=le'
|
- "traefik.http.routers.proxy.tls.certresolver=le"
|
||||||
- 'traefik.port=80'
|
- "traefik.port=80"
|
||||||
|
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
internal_network:
|
internal_network:
|
||||||
|
external:
|
||||||
|
name: internal_network
|
||||||
|
web:
|
||||||
|
external: true
|
||||||
|
|||||||
68
nginx.conf
68
nginx.conf
@ -1,52 +1,40 @@
|
|||||||
|
|
||||||
worker_processes 4;
|
|
||||||
|
|
||||||
events {
|
|
||||||
worker_connections 1024;
|
|
||||||
}
|
|
||||||
|
|
||||||
upstream auth_server {
|
upstream auth_server {
|
||||||
server auth_server:80;
|
server auth_server:80;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
|
||||||
http {
|
gzip on;
|
||||||
server {
|
gzip_min_length 1000;
|
||||||
listen 80;
|
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;
|
include /etc/nginx/mime.types;
|
||||||
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;
|
# AUTHENTICATION
|
||||||
|
error_page 401 /login;
|
||||||
|
|
||||||
# AUTHENTICATION
|
location = /auth {
|
||||||
error_page 401 /login;
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
location = /auth {
|
location /download {
|
||||||
internal;
|
auth_request /auth;
|
||||||
|
proxy_pass $URL_DOWNLOAD;
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
location /download {
|
|
||||||
auth_request /auth;
|
|
||||||
proxy_pass $URL_DOWNLOAD;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user