Skip to content

Commit

Permalink
Make sure Vault service is up before unsealing, closes mist.api#196
Browse files Browse the repository at this point in the history
  • Loading branch information
dimgal1 committed May 10, 2022
1 parent f31af51 commit ef95f41
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 7 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ services:
hubshell:
<<: *backend
command: bin/wait-all bin/hubshell

api:
<<: *backend
command: bin/wait-all bin/uwsgi
Expand Down Expand Up @@ -239,17 +239,19 @@ services:

vault-init:
depends_on:
- vault
- vault
image: $IMG_REGISTRY/vault:$IMG_TAG
volumes:
- vault-config:/vault/config:rw
- vault-policies:/vault/policies:rw
- approle:/approle
entrypoint: /init/vault-init.sh

entrypoint: [ "/bin/sh", "-c" ]
command:
- |
/bin/wait-for vault:8200
/init/vault-init.sh sh /etc/init.d/vault-play.sh
environment:
- VAULT_ADDR=http://vault:8200
command: sh /etc/init.d/vault-play.sh

volumes:
elasticsearch: {}
Expand Down
2 changes: 2 additions & 0 deletions docker/vault/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM vault:latest
RUN apk add vim grep socat jq
RUN wget -O /bin/wait-for https://github.com/eficode/wait-for/releases/download/v2.2.3/wait-for \
&& chmod +x /bin/wait-for
COPY ./init /init
COPY vault-start.sh /vault-start.sh

0 comments on commit ef95f41

Please sign in to comment.