consul update
This commit is contained in:
parent
69983d0efb
commit
e2f357e4af
|
@ -35,7 +35,7 @@ services:
|
|||
- "--api.insecure=true"
|
||||
- "--api.debug=false"
|
||||
- "--ping=true"
|
||||
- "--log.level=INFO"
|
||||
- "--log.level=DEBUG"
|
||||
- "--log.format=common"
|
||||
- "--accesslog=false"
|
||||
- "--entrypoints.web.address=:8081"
|
||||
|
@ -53,6 +53,11 @@ services:
|
|||
- "--providers.file.watch=true"
|
||||
- "--providers.file.directory=/etc/traefik/dynamic"
|
||||
- "--providers.file.debugloggeneratedtemplate=true"
|
||||
- "--providers.consulCatalog=true"
|
||||
- "--providers.consulCatalog.endpoint.address=consul:8500"
|
||||
- "--providers.consulCatalog.exposedByDefault=false"
|
||||
- "--providers.consulCatalog.stale=false"
|
||||
- "--providers.consulCatalog.prefix=traefik"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "wget -q --spider --proxy off localhost:8080/ping || exit 1"]
|
||||
interval: 5s
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
./mvnw.cmd clean spring-boot:build-image -Pnative -Dmaven.test.skip=true
|
||||
|
||||
#运行docker image
|
||||
docker compose -f compose.yml up -d
|
||||
docker compose -f compose-dev.yml up -d
|
||||
|
||||
docker compose -f compose-demo01-jib.yml up -d
|
||||
docker compose -f compose-demo01-jvm.yml up -d
|
||||
|
|
|
@ -33,8 +33,8 @@ spring:
|
|||
compatibility-verifier:
|
||||
enabled: false
|
||||
consul:
|
||||
host: localhost
|
||||
port: 8500
|
||||
host: ${CONSUL_HOST:consul}
|
||||
port: ${CONSUL_PORT:8500}
|
||||
discovery:
|
||||
register-health-check: true
|
||||
healthCheckPath: ${server.servlet.context-path}/actuator/health
|
||||
|
@ -43,7 +43,12 @@ spring:
|
|||
metrics: ${server.servlet.context-path}/actuator/prometheus
|
||||
springboot: true
|
||||
isv: risesoft
|
||||
tags: test,y9
|
||||
tags:
|
||||
- traefik.enable=true
|
||||
- traefik.http.routers.demo01.rule=PathPrefix(`/users`,`/actuator`)
|
||||
prefer-ip-address: true
|
||||
instance-id: ${spring.application.name}:${spring.application.instance-id:${random.value}}
|
||||
service-name: ${spring.application.name}
|
||||
datasource:
|
||||
driverClassName: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://localhost:3306/y9_public?serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&useUnicode=true&characterEncoding=utf-8&rewriteBatchedStatements=true&useCompression=true&useSSL=false&allowPublicKeyRetrieval=true
|
||||
|
|
Loading…
Reference in New Issue