dev cicd + tron + docs
This commit is contained in:
17
ci/dev/entrypoints/tron-gateway.sh
Executable file
17
ci/dev/entrypoints/tron-gateway.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
# Load Vault token from file if VAULT_TOKEN_FILE is set
|
||||
if [ -n "${VAULT_TOKEN_FILE:-}" ] && [ -f "${VAULT_TOKEN_FILE}" ]; then
|
||||
token="$(cat "${VAULT_TOKEN_FILE}" 2>/dev/null | tr -d '[:space:]')"
|
||||
if [ -n "${token}" ]; then
|
||||
export VAULT_TOKEN="${token}"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "${VAULT_TOKEN:-}" ]; then
|
||||
echo "[entrypoint] VAULT_TOKEN is not set; expected Vault Agent sink to write a token to ${VAULT_TOKEN_FILE:-/run/vault/token}" >&2
|
||||
fi
|
||||
|
||||
# Execute the command passed as arguments (e.g., air)
|
||||
exec "$@"
|
||||
Reference in New Issue
Block a user