1
0
Fork 0
mirror of https://github.com/anyproto/any-sync-dockercompose.git synced 2025-06-08 05:47:03 +09:00

OPS-473 added netcheck service

This commit is contained in:
Grigory Efimov 2024-05-30 19:34:24 -03:00
parent 339bfda8f2
commit 18e92cac9b
No known key found for this signature in database
GPG key ID: 0A88C34DFA7FD939
3 changed files with 7 additions and 16 deletions

View file

@ -10,6 +10,7 @@ ANY_SYNC_NODE_VERSION=prod
ANY_SYNC_FILENODE_VERSION=prod
ANY_SYNC_COORDINATOR_VERSION=prod
ANY_SYNC_CONSENSUSNODE_VERSION=prod
ANY_SYNC_TOOLS_VERSION=latest
MONGO_VERSION=7.0.2
REDIS_VERSION=7.2.0-v6

View file

@ -1,12 +0,0 @@
# syntax=docker/dockerfile:1
FROM golang:1.21.6-alpine3.19
RUN apk add --no-cache bash yq
RUN go install github.com/anyproto/any-sync-tools/any-sync-netcheck@latest
WORKDIR /code
#HEALTHCHECK \
# --start-period=3s \
# --retries=20 \
# --interval=10s \
# --timeout=3s \
# CMD echo 'HEALTHCHECK' | nc 127.0.0.1 8000 | grep -q HEALTHCHECK
#ENTRYPOINT ./docker-generateconfig/netcheck.sh

View file

@ -223,6 +223,7 @@ services:
# any-sync-netcheck
netcheck:
image: "ghcr.io/anyproto/any-sync-tools:${ANY_SYNC_TOOLS_VERSION}"
depends_on:
- any-sync-consensusnode
- any-sync-filenode
@ -230,10 +231,11 @@ services:
- any-sync-node-1
- any-sync-node-2
- any-sync-node-3
image: netcheck
build:
context: .
dockerfile: Dockerfile-netcheck
volumes:
- ./:/code
command: "tail -f /dev/null"
tty: true
healthcheck:
test: any-sync-netcheck -c /code/storage/docker-generateconfig/nodes.yml 2>&1| grep -P 'netcheck\s+success'
interval: 60s
start_period: 5s