diff --git a/compose-demo01-jib.yml b/compose-demo01-jib.yml index 7fa3ead..42be62c 100644 --- a/compose-demo01-jib.yml +++ b/compose-demo01-jib.yml @@ -18,11 +18,15 @@ services: - "traefik.enable=true" - "traefik.http.routers.demo01-jib.entrypoints=web" - "traefik.http.routers.demo01-jib.rule=PathPrefix(`/demo01`)" - - "traefik.http.services.demo01.loadbalancer.server.scheme=http" + - "traefik.http.routers.demo01-jib.service=demo01" - "traefik.http.services.demo01.loadbalancer.server.port=7055" + # Force TLS + - "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" networks: y9-share-net: diff --git a/compose-demo01-jvm.yml b/compose-demo01-jvm.yml index f2105c8..6d9b59f 100644 --- a/compose-demo01-jvm.yml +++ b/compose-demo01-jvm.yml @@ -18,8 +18,15 @@ services: - "traefik.enable=true" - "traefik.http.routers.demo01-jvm.entrypoints=web" - "traefik.http.routers.demo01-jvm.rule=PathPrefix(`/demo01`)" - - "traefik.http.services.demo01.loadbalancer.server.scheme=http" + - "traefik.http.routers.demo01-jvm.service=demo01" - "traefik.http.services.demo01.loadbalancer.server.port=7055" + + # Force TLS + - "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" networks: y9-share-net: diff --git a/compose-demo01-native.yml b/compose-demo01-native.yml index ba1c6b0..4bb0a59 100644 --- a/compose-demo01-native.yml +++ b/compose-demo01-native.yml @@ -18,8 +18,15 @@ services: - "traefik.enable=true" - "traefik.http.routers.demo01-native.entrypoints=web" - "traefik.http.routers.demo01-native.rule=PathPrefix(`/demo01`)" - - "traefik.http.services.demo01.loadbalancer.server.scheme=http" + - "traefik.http.routers.demo01-native.service=demo01" - "traefik.http.services.demo01.loadbalancer.server.port=7055" + + # Force TLS + - "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" networks: y9-share-net: diff --git a/compose-traefik.yml b/compose-traefik.yml index 10f4afd..0852cba 100644 --- a/compose-traefik.yml +++ b/compose-traefik.yml @@ -8,19 +8,25 @@ services: restart: unless-stopped extra_hosts: - "host.docker.internal:host-gateway" + - "www.dingzhaojun.top:127.0.0.1" networks: - - y9-share-net + y9-share-net: {} + mynet: + ipv4_address: '192.168.31.250' ports: + # Expose 8081 - "8081:8081" + # Expose 7443 for TLS + - "7443:7443" + # The Web UI (enabled by --api.insecure=true) - "8080:8080" - - "443:443" volumes: # Allows Traefik can listen to the Docker events - "/var/run/docker.sock:/var/run/docker.sock" # Mount the directory containing the certs - "d:/docker-config/traefik/certs:/etc/certs/" # Mount the dynamic configuration - - "d:/docker-config/traefik/dynamic/certs-traefik.yaml:/etc/traefik/dynamic/certs-traefik.yaml" + - "d:/docker-config/traefik/dynamic:/etc/traefik/dynamic" command: - "--global.sendanonymoususage=false" - "--global.checknewversion=false" @@ -33,7 +39,7 @@ services: - "--log.format=common" - "--accesslog=false" - "--entrypoints.web.address=:8081" - - "--entrypoints.web-ssl.address=:443" + - "--entrypoints.web-ssl.address=:7443" - "--entrypoints.traefik.address=:8080" - "--providers.docker=true" - "--providers.docker.watch=true" @@ -56,4 +62,6 @@ services: networks: y9-share-net: + external: true + mynet: external: true \ No newline at end of file