mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-25 07:00:48 +09:00
fix(deploy): docker health check failure
This commit is contained in:
@@ -97,12 +97,6 @@ services:
|
|||||||
- ${MEMOH_CONFIG:-./docker/config/config.docker.toml}:/config.toml:ro
|
- ${MEMOH_CONFIG:-./docker/config/config.docker.toml}:/config.toml:ro
|
||||||
ports:
|
ports:
|
||||||
- "8081:8081"
|
- "8081:8081"
|
||||||
healthcheck:
|
|
||||||
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://127.0.0.1:8081/health || exit 1"]
|
|
||||||
interval: 10s
|
|
||||||
timeout: 5s
|
|
||||||
retries: 5
|
|
||||||
start_period: 20s
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- server
|
- server
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|||||||
@@ -31,6 +31,8 @@ COPY --from=builder /build/node_modules /node_modules
|
|||||||
EXPOSE 8081
|
EXPOSE 8081
|
||||||
|
|
||||||
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
||||||
CMD wget --no-verbose --tries=1 --spider http://localhost:8081/health || exit 1
|
CMD wget --no-verbose --tries=1 --spider http://127.0.0.1:8081/health \
|
||||||
|
|| wget --no-verbose --tries=1 --spider http://agent:8081/health \
|
||||||
|
|| exit 1
|
||||||
|
|
||||||
CMD ["bun", "run", "dist/index.js"]
|
CMD ["bun", "run", "dist/index.js"]
|
||||||
|
|||||||
@@ -70,6 +70,8 @@ RUN mkdir -p /opt/memoh/data
|
|||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
||||||
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
||||||
CMD wget --no-verbose --tries=1 --spider http://localhost:8080/health || exit 1
|
CMD wget --no-verbose --tries=1 --spider http://127.0.0.1:8080/health \
|
||||||
|
|| wget --no-verbose --tries=1 --spider http://server:8080/health \
|
||||||
|
|| exit 1
|
||||||
|
|
||||||
CMD ["/app/memoh-server"]
|
CMD ["/app/memoh-server"]
|
||||||
|
|||||||
Reference in New Issue
Block a user