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:
2026-07-09 12:05:43 +09:00
parent 0fa09b4d90
commit 6408f4a5ec
4 changed files with 38 additions and 3 deletions
+20
View File
@@ -75,3 +75,23 @@
# Directory for delegate-job audit logs (sits beside .mam/jobs/).
#default: <cwd>/.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
+14
View File
@@ -26,6 +26,20 @@ Alternatively, if they have cloned the repository, they can execute:
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
To register these skills globally or for a specific workspace:
* **Workspace Level**: Copy the `.agents/` folder into your project root.
+2 -2
View File
@@ -54,8 +54,8 @@ echo "✅ PyYAML (system dependency) detected."
mkdir -p "$TARGET_DIR"
cd "$TARGET_DIR"
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"
REPO_URL="${MAM_REPO_URL:-https://git.godopu.com/tmpl/multi-agent-mux.git}"
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.
# Keying off a set of core files helps detect and recover from partial/interrupted installations.
+2 -1
View File
@@ -135,7 +135,8 @@ bash remove.sh --force
# 4. Fetch and run the latest installer from Gitea
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
curl -fsSL "$INSTALLER_URL" | bash -s -- "$TARGET_DIR"
elif command -v wget &>/dev/null; then