Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move healthcheck from compose to dockerfile due to proxy. #15

Merged
merged 1 commit into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 12 additions & 20 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,18 @@ services:
issuer:
container_name: "vc_issuer"
image: docker.sunet.se/dc4eu/issuer:latest
healthcheck:
test: curl --fail http://issuer:8080/health || exit 1
interval: 20s
retries: 5
timeout: 10s
restart: always
volumes:
- ./cert:/cert:ro
- ./dev_config_docker.yaml:/config.yaml:ro
links:
- haproxy
depends_on:
- redis
- mongo
- datastore
- registry
- haproxy
networks:
- vc-net
environment:
Expand All @@ -27,18 +25,16 @@ services:
verifier:
container_name: "vc_verifier"
image: docker.sunet.se/dc4eu/verifier:latest
healthcheck:
test: curl --fail http://verifier:8080/health || exit 1
interval: 20s
retries: 5
timeout: 10s
restart: always
volumes:
- ./cert:/cert:ro
- ./dev_config_docker.yaml:/config.yaml:ro
links:
- haproxy
depends_on:
- redis
- mongo
- haproxy
networks:
- vc-net
environment:
Expand All @@ -47,18 +43,16 @@ services:
datastore:
container_name: "vc_datastore"
image: docker.sunet.se/dc4eu/datastore:latest
healthcheck:
test: curl --fail http://datastore:8080/health || exit 1
interval: 20s
retries: 5
timeout: 10s
restart: always
volumes:
- ./cert:/cert:ro
- ./dev_config_docker.yaml:/config.yaml:ro
links:
- haproxy
depends_on:
- redis
- mongo
- haproxy
networks:
- vc-net
environment:
Expand All @@ -67,18 +61,16 @@ services:
registry:
container_name: "vc_registry"
image: docker.sunet.se/dc4eu/registry:latest
healthcheck:
test: curl --fail http://registry:8080/health || exit 1
interval: 20s
retries: 5
timeout: 10s
restart: always
volumes:
- ./cert:/cert:ro
- ./dev_config_docker.yaml:/config.yaml:ro
links:
- haproxy
depends_on:
- redis
- mongo
- haproxy
networks:
- vc-net
environment:
Expand Down
2 changes: 2 additions & 0 deletions dockerfiles/datastore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@ COPY --from=builder /go/src/app/docs /docs

EXPOSE 8080

HEALTHCHECK --interval=20s --timeout=10s CMD curl --connect-timeout 5 http://localhost:8080/health | grep -q STATUS_OK

CMD [ "./vc_datastore" ]
2 changes: 2 additions & 0 deletions dockerfiles/issuer
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@ COPY --from=builder /go/src/app/docs /docs

EXPOSE 8080

HEALTHCHECK --interval=20s --timeout=10s CMD curl --connect-timeout 5 http://localhost:8080/health | grep -q STATUS_OK

CMD [ "./vc_issuer" ]
2 changes: 2 additions & 0 deletions dockerfiles/registry
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@ COPY --from=builder /go/src/app/docs /docs

EXPOSE 8080

HEALTHCHECK --interval=20s --timeout=10s CMD curl --connect-timeout 5 http://localhost:8080/health | grep -q STATUS_OK

CMD [ "./vc_registry" ]
2 changes: 2 additions & 0 deletions dockerfiles/verifier
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@ COPY --from=builder /go/src/app/docs /docs

EXPOSE 8080

HEALTHCHECK --interval=20s --timeout=10s CMD curl --connect-timeout 5 http://localhost:8080/health | grep -q STATUS_OK

CMD [ "./vc_verifier" ]
Loading