compose
This commit is contained in:
parent
fc80be3677
commit
b802b17f0d
|
@ -13,20 +13,35 @@ services:
|
|||
ports:
|
||||
- "7055:7055"
|
||||
environment:
|
||||
'server.servlet.context-path': '/demo01'
|
||||
server.port: 7055
|
||||
server.servlet.context-path: '/demo01'
|
||||
labels:
|
||||
# 定义demo01-jib路由,entrypoints=web,接受http请求
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.demo01-jib.entrypoints=web"
|
||||
- "traefik.http.routers.demo01-jib.rule=PathPrefix(`/demo01`)"
|
||||
- "traefik.http.routers.demo01-jib.service=demo01"
|
||||
|
||||
# 定义demo01服务
|
||||
- "traefik.http.services.demo01.loadbalancer.passHostHeader=true"
|
||||
- "traefik.http.services.demo01.loadbalancer.server.port=7055"
|
||||
|
||||
# Force TLS
|
||||
# 指定路由demo01-jib的服务为demo01
|
||||
- "traefik.http.routers.demo01-jib.service=demo01"
|
||||
|
||||
# 默认轮询的方式进行负载,session sticky放开下面的注释
|
||||
#- "traefik.http.services.demo01.loadbalancer.sticky.cookie.name=demo01"
|
||||
|
||||
# 定义SSL,entrypoints=web-ssl,接受https请求,路由和服务要重新定义一次
|
||||
- "traefik.http.routers.demo01-jib-ssl.tls=true"
|
||||
- "traefik.http.routers.demo01-jib-ssl.entrypoints=web-ssl"
|
||||
- "traefik.http.routers.demo01-jib-ssl.rule=PathPrefix(`/demo01`)"
|
||||
- "traefik.http.routers.demo01-jib-ssl.service=demo01-ssl"
|
||||
- "traefik.http.services.demo01-ssl.loadbalancer.server.port=7055"
|
||||
- "traefik.http.routers.demo01-jib-ssl.service=demo01"
|
||||
|
||||
# HTTP 协议自动跳转 HTTPS
|
||||
#- "traefik.http.middlewares.to-https.redirectscheme.scheme=https"
|
||||
#- "traefik.http.middlewares.to-https.redirectscheme.permanent=true"
|
||||
#- "traefik.http.middlewares.to-https.redirectscheme.port=7443"
|
||||
#- "traefik.http.routers.demo01-jib.middlewares=to-https"
|
||||
|
||||
networks:
|
||||
y9-share-net:
|
||||
|
|
|
@ -11,22 +11,38 @@ services:
|
|||
networks:
|
||||
- y9-share-net
|
||||
ports:
|
||||
- "17055:7055"
|
||||
- "17055:7056"
|
||||
environment:
|
||||
'server.servlet.context-path': '/demo01'
|
||||
server.port: 7056
|
||||
server.servlet.context-path: '/demo01'
|
||||
labels:
|
||||
# 定义demo01-jvm路由,entrypoints=web,接受http请求
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.demo01-jvm.entrypoints=web"
|
||||
- "traefik.http.routers.demo01-jvm.rule=PathPrefix(`/demo01`)"
|
||||
- "traefik.http.routers.demo01-jvm.service=demo01"
|
||||
- "traefik.http.services.demo01.loadbalancer.server.port=7055"
|
||||
|
||||
# Force TLS
|
||||
# 定义demo01服务
|
||||
- "traefik.http.services.demo01.loadbalancer.passHostHeader=true"
|
||||
- "traefik.http.services.demo01.loadbalancer.server.port=7056"
|
||||
|
||||
# 指定路由demo01-jvm的服务为demo01
|
||||
- "traefik.http.routers.demo01-jvm.service=demo01"
|
||||
|
||||
# 默认轮询的方式进行负载,session sticky放开下面的注释
|
||||
#- "traefik.http.services.demo01.loadbalancer.sticky.cookie.name=demo01"
|
||||
|
||||
# 定义SSL,entrypoints=web-ssl,接受https请求,路由和服务要重新定义一次
|
||||
- "traefik.http.routers.demo01-jvm-ssl.tls=true"
|
||||
- "traefik.http.routers.demo01-jvm-ssl.entrypoints=web-ssl"
|
||||
- "traefik.http.routers.demo01-jvm-ssl.rule=PathPrefix(`/demo01`)"
|
||||
- "traefik.http.routers.demo01-jvm-ssl.service=demo01-ssl"
|
||||
- "traefik.http.services.demo01-ssl.loadbalancer.server.port=7055"
|
||||
- "traefik.http.routers.demo01-jvm-ssl.service=demo01"
|
||||
|
||||
|
||||
# HTTP 协议自动跳转 HTTPS
|
||||
#- "traefik.http.middlewares.to-https.redirectscheme.scheme=https"
|
||||
#- "traefik.http.middlewares.to-https.redirectscheme.permanent=true"
|
||||
#- "traefik.http.middlewares.to-https.redirectscheme.port=7443"
|
||||
#- "traefik.http.routers.demo01-jib.middlewares=to-https"
|
||||
|
||||
networks:
|
||||
y9-share-net:
|
||||
|
|
|
@ -11,22 +11,37 @@ services:
|
|||
networks:
|
||||
- y9-share-net
|
||||
ports:
|
||||
- "27055:7055"
|
||||
- "27055:7057"
|
||||
environment:
|
||||
'server.servlet.context-path': '/demo01'
|
||||
server.port: 7057
|
||||
server.servlet.context-path: '/demo01'
|
||||
labels:
|
||||
# 定义demo01-native路由,entrypoints=web,接受http请求
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.demo01-native.entrypoints=web"
|
||||
- "traefik.http.routers.demo01-native.rule=PathPrefix(`/demo01`)"
|
||||
- "traefik.http.routers.demo01-native.service=demo01"
|
||||
- "traefik.http.services.demo01.loadbalancer.server.port=7055"
|
||||
|
||||
# Force TLS
|
||||
# 定义demo01服务
|
||||
- "traefik.http.services.demo01.loadbalancer.passHostHeader=true"
|
||||
- "traefik.http.services.demo01.loadbalancer.server.port=7057"
|
||||
|
||||
# 指定路由demo01-native的服务为demo01
|
||||
- "traefik.http.routers.demo01-native.service=demo01"
|
||||
|
||||
# 默认轮询的方式进行负载,session sticky放开下面的注释
|
||||
#- "traefik.http.services.demo01.loadbalancer.sticky.cookie.name=demo01"
|
||||
|
||||
# 定义SSL,entrypoints=web-ssl,接受https请求,路由和服务要重新定义一次
|
||||
- "traefik.http.routers.demo01-native-ssl.tls=true"
|
||||
- "traefik.http.routers.demo01-native-ssl.entrypoints=web-ssl"
|
||||
- "traefik.http.routers.demo01-native-ssl.rule=PathPrefix(`/demo01`)"
|
||||
- "traefik.http.routers.demo01-native-ssl.service=demo01-ssl"
|
||||
- "traefik.http.services.demo01-ssl.loadbalancer.server.port=7055"
|
||||
- "traefik.http.routers.demo01-native-ssl.service=demo01"
|
||||
|
||||
# HTTP 协议自动跳转 HTTPS
|
||||
#- "traefik.http.middlewares.to-https.redirectscheme.scheme=https"
|
||||
#- "traefik.http.middlewares.to-https.redirectscheme.permanent=true"
|
||||
#- "traefik.http.middlewares.to-https.redirectscheme.port=7443"
|
||||
#- "traefik.http.routers.demo01-jib.middlewares=to-https"
|
||||
|
||||
networks:
|
||||
y9-share-net:
|
||||
|
|
Loading…
Reference in New Issue