dev cicd + tron + docs
This commit is contained in:
13
ci/dev/scripts/mongo-entrypoint.sh
Normal file
13
ci/dev/scripts/mongo-entrypoint.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
# MongoDB entrypoint wrapper for dev environment
|
||||
# Reads credentials from Vault secrets and initializes MongoDB
|
||||
set -euo pipefail
|
||||
|
||||
# Read credentials from Vault Agent-rendered files
|
||||
if [ -s /vault/secrets/MONGO_ROOT_USER ] && [ -s /vault/secrets/MONGO_ROOT_PASSWORD ]; then
|
||||
export MONGO_INITDB_ROOT_USERNAME="$(cat /vault/secrets/MONGO_ROOT_USER)"
|
||||
export MONGO_INITDB_ROOT_PASSWORD="$(cat /vault/secrets/MONGO_ROOT_PASSWORD)"
|
||||
fi
|
||||
|
||||
# Execute original MongoDB entrypoint
|
||||
exec docker-entrypoint.sh "$@"
|
||||
Reference in New Issue
Block a user