fix
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
apk add jq curl
|
apk add jq curl
|
||||||
|
|
||||||
|
VAULT_HOST=0.0.0.0:8200
|
||||||
|
|
||||||
root_token=$(cat /helpers/keys.json | jq -r '.root_token')
|
root_token=$(cat /helpers/keys.json | jq -r '.root_token')
|
||||||
|
|
||||||
unseal_vault() {
|
unseal_vault() {
|
||||||
@@ -14,7 +16,7 @@ then
|
|||||||
unseal_vault
|
unseal_vault
|
||||||
else
|
else
|
||||||
echo "Vault not initialized"
|
echo "Vault not initialized"
|
||||||
curl -s --request POST --data '{"secret_shares": 1, "secret_threshold": 1}' ${VAULT_HOST}/v1/sys/init > /helpers/keys.json
|
curl -s --request POST --data '{"secret_shares": 1, "secret_threshold": 1}' http://${VAULT_HOST}/v1/sys/init > /helpers/keys.json
|
||||||
root_token=$(cat /helpers/keys.json | jq -r '.root_token')
|
root_token=$(cat /helpers/keys.json | jq -r '.root_token')
|
||||||
|
|
||||||
unseal_vault
|
unseal_vault
|
||||||
|
4
start.sh
4
start.sh
@@ -5,12 +5,10 @@
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
source .env
|
|
||||||
|
|
||||||
docker compose up -d
|
docker compose up -d
|
||||||
|
|
||||||
while [[ ! $(docker inspect -f {{.State.Health.Status}} vault) == "healthy" ]]; do
|
while [[ ! $(docker inspect -f {{.State.Health.Status}} vault) == "healthy" ]]; do
|
||||||
sleep 0.5;
|
sleep 0.5;
|
||||||
done
|
done
|
||||||
|
|
||||||
docker exec vault /bin/sh -c "export VAULT_HOST=${VAULT_HOST} && source /helpers/init.sh"
|
docker exec vault /bin/sh -c "source /helpers/init.sh"
|
||||||
|
Reference in New Issue
Block a user