deploy

Build and push Docker images, create GCE instance templates, and perform MIG rollbacks to staging.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/Number531/Legal-API --skill deploy-number531
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: deploy
Source: https://github.com/Number531/Legal-API/tree/main/.claude/skills/deploy
Command: npx skills add https://github.com/Number531/Legal-API --skill deploy-number531

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires docker, gcloud, git, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Automates building and deploying the Super Legal MCP container to Google Compute Engine (GCE) staging, eliminating manual steps and reducing deployment errors.

Core Features & Use Cases

  • Build and push Docker images to Artifact Registry (linux/amd64), create instance templates, perform a rolling MIG update, assign a static IP, rotate SSH keys, and verify health from the target VM.
  • Support cross-compilation (ARM Mac to linux/amd64) and standard docker build + push (no buildx), with environment injection from flags.env and .env.
  • Use case: When you need to deploy code changes to staging for end-to-end tests, this skill automates the entire pipeline and reports status.

Quick Start

Execute the deploy.sh script in the skill directory to perform a complete Docker build and GCE staging deployment.

Frequently Asked Questions about deploy

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate Docker image deployment to GCE staging with a rolling update?

You can automate GCE staging deployment by executing a script that builds and pushes a Docker image to Artifact Registry, creates a GCE instance template, and performs a MIG rolling update with automated health verification.

Can I build and push linux/amd64 Docker images from an ARM Mac to Google Artifact Registry?

Yes, the deployment workflow supports cross-compilation from ARM Mac to linux/amd64 for pushing Docker images to Artifact Registry using standard docker build and push without buildx.

Do I need the gcloud CLI and Docker installed to deploy to GCE staging?

Yes, deploying to GCE staging requires Docker, the Google Cloud CLI, and git installed. The workflow reads environment configuration from flags.env and .env files to inject variables during the build process.

What is the best way to perform a MIG rollback to staging after pushing a new Docker image?

Performing a MIG rollback to staging involves creating a new GCE instance template from the pushed Docker image and initiating a rolling MIG update. The workflow assigns a static IP, rotates SSH keys, and verifies health from the target VM.

Why does my automated GCE deployment need environment variables from flags.env and .env files?

Automated GCE deployment reads environment variables from flags.env and .env files to enable environment injection during the Docker build and push process. This ensures the container is configured correctly for staging deployment.

Does this deployment workflow support health verification after a GCE rolling update?

Yes, the deployment workflow performs automated health verification from the target VM after completing the rolling MIG update. This ensures the newly deployed Docker image and GCE instance template are running correctly in staging.