feat(deploy): parameterize distribution URLs via MAM_*_URL env vars
- install.sh: REPO_URL and ARCHIVE_URL now use ${MAM_REPO_URL:-...} and ${MAM_ARCHIVE_URL:-...}
- update.sh: INSTALLER_URL now uses ${MAM_INSTALLER_URL:-...} with env-inheritance comment
- .env.example: add MAM_REPO_URL / MAM_ARCHIVE_URL / MAM_INSTALLER_URL section with usage notes
- deploy/README.md: add Custom Fork / Private Mirror installation examples
This commit is contained in:
@@ -75,3 +75,23 @@
|
|||||||
# Directory for delegate-job audit logs (sits beside .mam/jobs/).
|
# Directory for delegate-job audit logs (sits beside .mam/jobs/).
|
||||||
#default: <cwd>/.mam/delegate_job_logs
|
#default: <cwd>/.mam/delegate_job_logs
|
||||||
# DELEGATE_JOB_LOGS_DIR=/path/to/workspace/.mam/delegate_job_logs
|
# DELEGATE_JOB_LOGS_DIR=/path/to/workspace/.mam/delegate_job_logs
|
||||||
|
|
||||||
|
# ==============================================================================
|
||||||
|
# deploy / distribution source (for forks/mirrors)
|
||||||
|
# ==============================================================================
|
||||||
|
# Note: These variables are read from the execution environment by deployment scripts.
|
||||||
|
# Since deploy/install.sh runs before .env exists, you must pass them via export
|
||||||
|
# or prepended variables (e.g. MAM_REPO_URL=... bash deploy/install.sh).
|
||||||
|
# If you run a private mirror, we strongly recommend configuring all three variables.
|
||||||
|
|
||||||
|
# Distribution repository URL (cloned during recovery steps).
|
||||||
|
#default: https://git.godopu.com/tmpl/multi-agent-mux.git
|
||||||
|
# MAM_REPO_URL=https://git.godopu.com/tmpl/multi-agent-mux.git
|
||||||
|
|
||||||
|
# Distribution archive download URL (used for bootstrap extraction).
|
||||||
|
#default: https://git.godopu.com/tmpl/multi-agent-mux/archive/main.tar.gz
|
||||||
|
# MAM_ARCHIVE_URL=https://git.godopu.com/tmpl/multi-agent-mux/archive/main.tar.gz
|
||||||
|
|
||||||
|
# Distribution update/installer script URL.
|
||||||
|
#default: https://git.godopu.com/tmpl/multi-agent-mux/raw/branch/main/deploy/install.sh
|
||||||
|
# MAM_INSTALLER_URL=https://git.godopu.com/tmpl/multi-agent-mux/raw/branch/main/deploy/install.sh
|
||||||
|
|||||||
@@ -26,6 +26,20 @@ Alternatively, if they have cloned the repository, they can execute:
|
|||||||
bash deploy/install.sh
|
bash deploy/install.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### 2. Custom Fork / Private Mirror Installations
|
||||||
|
If you run a private mirror or fork, you can override the source URLs during installation using environment variables:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Installing from a custom mirror (pipe prepends must be applied to the bash command)
|
||||||
|
curl -fsSL https://my-mirror.example.com/.../install.sh \
|
||||||
|
| MAM_REPO_URL=https://my-mirror.example.com/me/multi-agent-mux.git \
|
||||||
|
MAM_ARCHIVE_URL=https://my-mirror.example.com/me/multi-agent-mux/archive/main.tar.gz \
|
||||||
|
bash
|
||||||
|
|
||||||
|
# Updating an existing workspace against a mirror
|
||||||
|
MAM_INSTALLER_URL=https://my-mirror.example.com/.../install.sh bash deploy/update.sh
|
||||||
|
```
|
||||||
|
|
||||||
### 2. Registering as a Workspace Plugin
|
### 2. Registering as a Workspace Plugin
|
||||||
To register these skills globally or for a specific workspace:
|
To register these skills globally or for a specific workspace:
|
||||||
* **Workspace Level**: Copy the `.agents/` folder into your project root.
|
* **Workspace Level**: Copy the `.agents/` folder into your project root.
|
||||||
|
|||||||
+2
-2
@@ -54,8 +54,8 @@ echo "✅ PyYAML (system dependency) detected."
|
|||||||
mkdir -p "$TARGET_DIR"
|
mkdir -p "$TARGET_DIR"
|
||||||
cd "$TARGET_DIR"
|
cd "$TARGET_DIR"
|
||||||
|
|
||||||
REPO_URL="https://git.godopu.com/tmpl/multi-agent-mux.git"
|
REPO_URL="${MAM_REPO_URL:-https://git.godopu.com/tmpl/multi-agent-mux.git}"
|
||||||
ARCHIVE_URL="https://git.godopu.com/tmpl/multi-agent-mux/archive/main.tar.gz"
|
ARCHIVE_URL="${MAM_ARCHIVE_URL:-https://git.godopu.com/tmpl/multi-agent-mux/archive/main.tar.gz}"
|
||||||
|
|
||||||
# Helper to verify presence of all core runtime files.
|
# Helper to verify presence of all core runtime files.
|
||||||
# Keying off a set of core files helps detect and recover from partial/interrupted installations.
|
# Keying off a set of core files helps detect and recover from partial/interrupted installations.
|
||||||
|
|||||||
+2
-1
@@ -135,7 +135,8 @@ bash remove.sh --force
|
|||||||
|
|
||||||
# 4. Fetch and run the latest installer from Gitea
|
# 4. Fetch and run the latest installer from Gitea
|
||||||
echo "📥 Fetching and running the latest installer..."
|
echo "📥 Fetching and running the latest installer..."
|
||||||
INSTALLER_URL="https://git.godopu.com/tmpl/multi-agent-mux/raw/branch/main/deploy/install.sh"
|
# Note: MAM_*_URL environment variables are automatically inherited by the child installer bash process.
|
||||||
|
INSTALLER_URL="${MAM_INSTALLER_URL:-https://git.godopu.com/tmpl/multi-agent-mux/raw/branch/main/deploy/install.sh}"
|
||||||
if command -v curl &>/dev/null; then
|
if command -v curl &>/dev/null; then
|
||||||
curl -fsSL "$INSTALLER_URL" | bash -s -- "$TARGET_DIR"
|
curl -fsSL "$INSTALLER_URL" | bash -s -- "$TARGET_DIR"
|
||||||
elif command -v wget &>/dev/null; then
|
elif command -v wget &>/dev/null; then
|
||||||
|
|||||||
Reference in New Issue
Block a user