Create reverse proxy config for deployed services
Generates and deploys SWAG reverse proxy configurations for new services.
/plugin marketplace add jmagar/claude-box/plugin install claude-box@claude-box<server_name> <upstream_app> <upstream_port> [protocol] [auth]Create a SWAG reverse proxy configuration from the template and deploy it to the SWAG server.
Arguments received: $ARGUMENTS
Expected format: server_name upstream_app upstream_port [protocol] [auth]
Parse into variables:
server_name: Subdomain name (required, position 1)upstream_app: Container name or host IP (required, position 2)upstream_port: Service port number (required, position 3)protocol: http or https (optional, position 4, default: http)auth: auth or noauth (optional, position 5, default: auth)Verify all inputs before proceeding:
If validation fails, explain the error and show correct usage.
~/.claude/templates/swag_template.subdomain.conf<container_name> → {server_name}<port_number> → {upstream_port}<http or https> → {protocol}#include /config/nginx/authelia-location.conf (remove the # at start of line)/tmp/{server_name}.subdomain.confCheck if file exists on target:
ssh squirts "test -f /mnt/appdata/swag/nginx/proxy-confs/{server_name}.subdomain.conf && echo 'exists' || echo 'new'"
If file exists, create backup:
ssh squirts "cp /mnt/appdata/swag/nginx/proxy-confs/{server_name}.subdomain.conf /mnt/appdata/swag/nginx/proxy-confs/{server_name}.subdomain.conf.bak"
Deploy the configuration:
rsync -avz /tmp/{server_name}.subdomain.conf squirts:/mnt/appdata/swag/nginx/proxy-confs/
Verify deployment:
ssh squirts "ls -lh /mnt/appdata/swag/nginx/proxy-confs/{server_name}.subdomain.conf"
Clean up temporary file:
rm /tmp/{server_name}.subdomain.conf
Provide a summary including:
If any step fails: