Initial dev deployment [infra]
This commit is contained in:
@@ -15,6 +15,7 @@ trap 'echo "[deploy-db] error at line $LINENO" >&2' ERR
|
||||
|
||||
REMOTE_DIR="${REMOTE_BASE%/}/${DB_DIR}"
|
||||
REMOTE_TARGET="${SSH_USER}@${SSH_HOST}"
|
||||
RUNTIME_ENV_FILE="${RUNTIME_ENV_FILE:-ci/prod/.env.runtime}"
|
||||
|
||||
# SSH options: quiet by default; add -vv in debug mode
|
||||
SSH_OPTS=(
|
||||
@@ -37,7 +38,7 @@ ssh "${SSH_OPTS[@]}" "$REMOTE_TARGET" "mkdir -p ${REMOTE_DIR}/{compose,env}"
|
||||
|
||||
# Sync compose bundle and runtime env to the remote host
|
||||
rsync "${RSYNC_FLAGS[@]}" -e "ssh ${SSH_OPTS[*]}" ci/prod/compose/ "$REMOTE_TARGET:${REMOTE_DIR}/compose/"
|
||||
rsync "${RSYNC_FLAGS[@]}" -e "ssh ${SSH_OPTS[*]}" ci/prod/.env.runtime "$REMOTE_TARGET:${REMOTE_DIR}/env/.env.runtime"
|
||||
rsync "${RSYNC_FLAGS[@]}" -e "ssh ${SSH_OPTS[*]}" "${RUNTIME_ENV_FILE}" "$REMOTE_TARGET:${REMOTE_DIR}/env/.env.runtime"
|
||||
|
||||
# Deploy on remote: pass AppRole creds ONLY to compose invocations.
|
||||
# The vault-agent container writes them into tmpfs and unsets them internally.
|
||||
|
||||
Reference in New Issue
Block a user