963 markdown files reformatted with the repository's pinned prettier so pnpm format:check covers the folded tree like every other repo file. The formatter's embedded-language pass also normalized code fences (TS semicolons, closed HTML tags in examples, lowercased CSS hex colors, one renumbered list that skipped an index). Alphanumeric token deltas vs the fold commit were audited file-by-file; all are formatter-equivalent markup normalizations plus the four sanitized skills.
2.3 KiB
2.3 KiB
name, description
| name | description |
|---|---|
| mosaic-portainer | Manage Portainer stacks on the Mosaic infrastructure. Use when asked to list, start, stop, redeploy, or check logs of Docker Swarm stacks via Portainer. Wraps scripts in ~/.config/mosaic/tools/portainer/. Requires load_credentials portainer first. |
mosaic-portainer
Manage Portainer stacks via pre-built Mosaic scripts.
Setup
Always load credentials before running scripts:
source ~/.config/mosaic/tools/_lib/credentials.sh
load_credentials portainer
# Exports: PORTAINER_URL, PORTAINER_API_KEY
Scripts
All scripts live in ~/.config/mosaic/tools/portainer/.
| Script | Purpose | Key flags |
|---|---|---|
stack-list.sh |
List all stacks | — |
stack-status.sh |
Status of a stack | -n <name> |
stack-redeploy.sh |
Redeploy (file or git-based) | -n <name> [-p] (pull images) |
stack-start.sh |
Start a stopped stack | -n <name> |
stack-stop.sh |
Stop a running stack | -n <name> |
stack-logs.sh |
Tail stack logs | -n <name> [-l lines] |
endpoint-list.sh |
List Portainer endpoints | — |
Common Workflows
Redeploy a stack with fresh images:
source ~/.config/mosaic/tools/_lib/credentials.sh && load_credentials portainer
~/.config/mosaic/tools/portainer/stack-redeploy.sh -n mosaic-stack -p
Check all stack statuses:
source ~/.config/mosaic/tools/_lib/credentials.sh && load_credentials portainer
~/.config/mosaic/tools/portainer/stack-list.sh
Tail logs for a service:
source ~/.config/mosaic/tools/_lib/credentials.sh && load_credentials portainer
~/.config/mosaic/tools/portainer/stack-logs.sh -n mosaic-stack -l 100
Notes
- Portainer URL:
https://10.1.1.43:9443 - Primary Docker host:
w-docker0(10.1.1.45) managed via Portainer agent - Docker Swarm image updates:
stack-redeploy.sh -pdoes NOT guarantee new image pull if digest is pinned; SSH to node anddocker pullfirst if needed - Credentials:
load_credentials portainer(framework credentials store)