Skip to content

Commit

Permalink
fix health probe + change entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Wrede committed Nov 19, 2024
1 parent d494cb6 commit 1dbde1c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ RUN python -m venv /venv \

# Install grpc health probe
RUN if [ ! -z "$GRPC_HEALTH_PROBE_VERSION" ]; then \
wget -qO /bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \
chmod +x /bin/grpc_health_probe; \
wget -qO /build/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \
chmod +x /build/grpc_health_probe; \
fi

# Stage 2: Runtime
Expand Down
18 changes: 11 additions & 7 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ services:
depends_on:
- minio
- mongo
entrypoint: [ "sh", "-c" ]
command:
- "/venv/bin/pip install --no-cache-dir -e . && /venv/bin/fedn controller start"
- controller
- start
ports:
- 8092:8092

Expand All @@ -92,13 +92,15 @@ services:
working_dir: /app
volumes:
- ${HOST_REPO_DIR:-.}/fedn:/app/fedn
entrypoint: [ "sh", "-c" ]
command:
- "/venv/bin/pip install --no-cache-dir -e . && /venv/bin/fedn combiner start --init config/settings-combiner.yaml.template"
- combiner
- start
- --init
- config/settings-combiner.yaml.template
ports:
- 12080:12080
healthcheck:
test: [ "CMD", "/bin/grpc_health_probe", "-addr=localhost:12080" ]
test: [ "CMD", "/app/grpc_health_probe", "-addr=localhost:12080" ]
interval: 20s
timeout: 10s
retries: 5
Expand Down Expand Up @@ -141,9 +143,11 @@ services:
working_dir: /app
volumes:
- ${HOST_REPO_DIR:-.}/fedn:/app/fedn
entrypoint: [ "sh", "-c" ]
command:
- "/venv/bin/pip install --no-cache-dir -e . && /venv/bin/fedn client start --api-url http://api-server:8092"
- client
- start
- --api-url
- http://api-server:8092
deploy:
replicas: 0
depends_on:
Expand Down

0 comments on commit 1dbde1c

Please sign in to comment.