mirror of
https://github.com/flibusta-apps/library_updater.git
synced 2025-12-06 07:45:35 +01:00
Add vault
This commit is contained in:
7
scripts/env.sh
Normal file
7
scripts/env.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
#! /usr/bin/env sh
|
||||
|
||||
response=`curl -X 'GET' "https://$VAULT_HOST/v1/$VAULT_SECRET_PATH" -s \
|
||||
-H 'accept: application/json' \
|
||||
-H "X-Vault-Token: $VAULT_TOKEN"`
|
||||
|
||||
echo "$(echo "$response" | jq -r '.data.data | to_entries | map("\(.key)='\''\(.value)'\''") | .[]')"
|
||||
@@ -1,11 +0,0 @@
|
||||
import os
|
||||
|
||||
import httpx
|
||||
|
||||
|
||||
response = httpx.get(
|
||||
"http://localhost:8080/healthcheck",
|
||||
headers={"Authorization": os.environ["API_KEY"]},
|
||||
)
|
||||
print(f"HEALTHCHECK STATUS: {response.status_code}")
|
||||
exit(0 if response.status_code == 200 else 1)
|
||||
7
scripts/start.sh
Normal file
7
scripts/start.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
#! /usr/bin/env sh
|
||||
|
||||
cd /app
|
||||
|
||||
/env.sh > ./.env
|
||||
|
||||
exec /usr/local/bin/library_updater
|
||||
Reference in New Issue
Block a user