Skip to content

Commit

Permalink
Merge pull request #15 from SUNET/masv_docker-healthcheck
Browse files Browse the repository at this point in the history
Move healthcheck from compose to dockerfile due to proxy.
  • Loading branch information
vinas003 authored Oct 23, 2023
2 parents 71b165b + b3991a2 commit b04a8c4
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 20 deletions.
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" ]

0 comments on commit b04a8c4

Please sign in to comment.