refactor(docker): 更新Python基础镜像至3.11-slim-bullseye
refactor(consul): 统一服务配置使用服务名和标准端口 更新Dockerfile中的Python基础镜像版本以使用更稳定的3.11版本 修改consul配置文件中服务检查地址和端口,使用服务名替代IP地址并统一端口号
This commit is contained in:
parent
57550a2524
commit
5286cb0e80
@ -2,7 +2,7 @@
|
|||||||
"service": {
|
"service": {
|
||||||
"address": "data-service",
|
"address": "data-service",
|
||||||
"check": {
|
"check": {
|
||||||
"http": "http://10.195.102.127:18000/api/public/stock_bid_ask_em?symbol=000001",
|
"http": "http://data-service:8000/api/public/stock_bid_ask_em?symbol=000001",
|
||||||
"interval": "10s",
|
"interval": "10s",
|
||||||
"timeout": "5s"
|
"timeout": "5s"
|
||||||
},
|
},
|
||||||
@ -16,6 +16,6 @@
|
|||||||
"traefik.http.routers.data-service.middlewares=data-service-stripprefix@consulcatalog"
|
"traefik.http.routers.data-service.middlewares=data-service-stripprefix@consulcatalog"
|
||||||
],
|
],
|
||||||
"name": "data-service",
|
"name": "data-service",
|
||||||
"port": 18000
|
"port": 8000
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2,7 +2,7 @@
|
|||||||
"service": {
|
"service": {
|
||||||
"address": "emotion-service",
|
"address": "emotion-service",
|
||||||
"check": {
|
"check": {
|
||||||
"http": "http://10.195.102.127:18002/health",
|
"http": "http://emotion-service:8002/health",
|
||||||
"interval": "10s",
|
"interval": "10s",
|
||||||
"timeout": "5s"
|
"timeout": "5s"
|
||||||
},
|
},
|
||||||
@ -15,6 +15,6 @@
|
|||||||
"traefik.http.routers.emotion-service.middlewares=emotion-service-stripprefix@consulcatalog"
|
"traefik.http.routers.emotion-service.middlewares=emotion-service-stripprefix@consulcatalog"
|
||||||
],
|
],
|
||||||
"name": "emotion-service",
|
"name": "emotion-service",
|
||||||
"port": 18002
|
"port": 8002
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2,7 +2,7 @@
|
|||||||
"service": {
|
"service": {
|
||||||
"address": "frontend",
|
"address": "frontend",
|
||||||
"check": {
|
"check": {
|
||||||
"http": "http://10.195.102.127:180/",
|
"http": "http://frontend/",
|
||||||
"interval": "10s",
|
"interval": "10s",
|
||||||
"timeout": "5s"
|
"timeout": "5s"
|
||||||
},
|
},
|
||||||
@ -14,6 +14,6 @@
|
|||||||
"traefik.http.routers.frontend.entrypoints=web"
|
"traefik.http.routers.frontend.entrypoints=web"
|
||||||
],
|
],
|
||||||
"name": "frontend",
|
"name": "frontend",
|
||||||
"port": 180
|
"port": 80
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2,7 +2,7 @@
|
|||||||
"service": {
|
"service": {
|
||||||
"address": "quant-service",
|
"address": "quant-service",
|
||||||
"check": {
|
"check": {
|
||||||
"http": "http://10.195.102.127:18001/health",
|
"http": "http://quant-service:8001/health",
|
||||||
"interval": "10s",
|
"interval": "10s",
|
||||||
"timeout": "5s"
|
"timeout": "5s"
|
||||||
},
|
},
|
||||||
@ -15,6 +15,6 @@
|
|||||||
"traefik.http.routers.quant-service.middlewares=quant-service-stripprefix@consulcatalog"
|
"traefik.http.routers.quant-service.middlewares=quant-service-stripprefix@consulcatalog"
|
||||||
],
|
],
|
||||||
"name": "quant-service",
|
"name": "quant-service",
|
||||||
"port": 18001
|
"port": 8001
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2,7 +2,7 @@
|
|||||||
"service": {
|
"service": {
|
||||||
"address": "recommend-service",
|
"address": "recommend-service",
|
||||||
"check": {
|
"check": {
|
||||||
"http": "http://10.195.102.127:18003/health",
|
"http": "http://user-service:8003/health",
|
||||||
"interval": "10s",
|
"interval": "10s",
|
||||||
"timeout": "5s"
|
"timeout": "5s"
|
||||||
},
|
},
|
||||||
@ -15,6 +15,6 @@
|
|||||||
"traefik.http.routers.recommend-service.middlewares=recommend-service-stripprefix@consulcatalog"
|
"traefik.http.routers.recommend-service.middlewares=recommend-service-stripprefix@consulcatalog"
|
||||||
],
|
],
|
||||||
"name": "recommend-service",
|
"name": "recommend-service",
|
||||||
"port": 18003
|
"port": 8003
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2,7 +2,7 @@
|
|||||||
"service": {
|
"service": {
|
||||||
"address": "user-service",
|
"address": "user-service",
|
||||||
"check": {
|
"check": {
|
||||||
"http": "http://10.195.102.127:18004/health",
|
"http": "http://user-service:8004/health",
|
||||||
"interval": "10s",
|
"interval": "10s",
|
||||||
"timeout": "5s"
|
"timeout": "5s"
|
||||||
},
|
},
|
||||||
@ -15,6 +15,6 @@
|
|||||||
"traefik.http.routers.user-service.middlewares=user-service-stripprefix@consulcatalog"
|
"traefik.http.routers.user-service.middlewares=user-service-stripprefix@consulcatalog"
|
||||||
],
|
],
|
||||||
"name": "user-service",
|
"name": "user-service",
|
||||||
"port": 18004
|
"port": 8004
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
FROM python:3.10-slim
|
FROM python:3.11-slim-bullseye
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY requirements.txt .
|
COPY requirements.txt .
|
||||||
RUN pip install -r requirements.txt
|
RUN pip install -r requirements.txt
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
FROM python:3.10-slim
|
FROM python:3.11-slim-bullseye
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY requirements.txt .
|
COPY requirements.txt .
|
||||||
RUN pip install -r requirements.txt
|
RUN pip install -r requirements.txt
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user