docs: add healthcheck for halo in compose (#189)

在 Docker Compose 文件中,使用 `/actuator/health/readiness` 接口为 Halo 服务增加健康检查。


```release-note
docs: add healthcheck for halo in compose
```
JohnNiang-patch-1
BugKing 2 years ago committed by GitHub
parent f21171de21
commit f6e0ae6f1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -66,6 +66,12 @@ import DockerArgs from "./slots/docker-args.md"
- ./:/root/.halo2 - ./:/root/.halo2
ports: ports:
- "8090:8090" - "8090:8090"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8090/actuator/health/readiness"]
interval: 30s
timeout: 5s
retries: 5
start_period: 30s
command: command:
- --spring.r2dbc.url=r2dbc:pool:postgresql://halodb/halo - --spring.r2dbc.url=r2dbc:pool:postgresql://halodb/halo
- --spring.r2dbc.username=halo - --spring.r2dbc.username=halo
@ -122,6 +128,12 @@ import DockerArgs from "./slots/docker-args.md"
- ./:/root/.halo2 - ./:/root/.halo2
ports: ports:
- "8090:8090" - "8090:8090"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8090/actuator/health/readiness"]
interval: 30s
timeout: 5s
retries: 5
start_period: 30s
command: command:
- --spring.r2dbc.url=r2dbc:pool:mysql://halodb:3306/halo - --spring.r2dbc.url=r2dbc:pool:mysql://halodb:3306/halo
- --spring.r2dbc.username=root - --spring.r2dbc.username=root
@ -179,6 +191,12 @@ import DockerArgs from "./slots/docker-args.md"
- ./:/root/.halo2 - ./:/root/.halo2
ports: ports:
- "8090:8090" - "8090:8090"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8090/actuator/health/readiness"]
interval: 30s
timeout: 5s
retries: 5
start_period: 30s
command: command:
# 外部访问地址,请根据实际需要修改 # 外部访问地址,请根据实际需要修改
- --halo.external-url=http://localhost:8090/ - --halo.external-url=http://localhost:8090/

@ -66,6 +66,12 @@ import DockerArgs from "./slots/docker-args.md"
- ./:/root/.halo2 - ./:/root/.halo2
ports: ports:
- "8090:8090" - "8090:8090"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8090/actuator/health/readiness"]
interval: 30s
timeout: 5s
retries: 5
start_period: 30s
command: command:
- --spring.r2dbc.url=r2dbc:pool:postgresql://halodb/halo - --spring.r2dbc.url=r2dbc:pool:postgresql://halodb/halo
- --spring.r2dbc.username=halo - --spring.r2dbc.username=halo
@ -122,6 +128,12 @@ import DockerArgs from "./slots/docker-args.md"
- ./:/root/.halo2 - ./:/root/.halo2
ports: ports:
- "8090:8090" - "8090:8090"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8090/actuator/health/readiness"]
interval: 30s
timeout: 5s
retries: 5
start_period: 30s
command: command:
- --spring.r2dbc.url=r2dbc:pool:mysql://halodb:3306/halo - --spring.r2dbc.url=r2dbc:pool:mysql://halodb:3306/halo
- --spring.r2dbc.username=root - --spring.r2dbc.username=root
@ -179,6 +191,12 @@ import DockerArgs from "./slots/docker-args.md"
- ./:/root/.halo2 - ./:/root/.halo2
ports: ports:
- "8090:8090" - "8090:8090"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8090/actuator/health/readiness"]
interval: 30s
timeout: 5s
retries: 5
start_period: 30s
command: command:
# 外部访问地址,请根据实际需要修改 # 外部访问地址,请根据实际需要修改
- --halo.external-url=http://localhost:8090/ - --halo.external-url=http://localhost:8090/

Loading…
Cancel
Save