Token导航 LogoToken导航TokenDH.com
前端设计敏感数据github未标认证来源可访问许可证需确认审计异常

docker-composeDocker Compose 编排

Agent Skill

用于辅助云资源、部署、容器、基础设施和运维自动化任务。它适合让 Agent 检查配置、整理部署步骤、分析资源状态、生成排障思路或辅助云服务接入。使用时需要明确目标环境、账号权限、区域和资源组,区分本地测试与生产操作;涉及删除资源、重启服务、修改网络或权限配置时,应先确认影响范围。

总安装

220

周安装

9

GitHub Stars

3

下载量

71
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:docker-compose(Docker Compose 编排)
来源仓库:https://github.com/phasehq/ai
仓库路径:skills/docker-compose
安装命令:
npx skills add https://github.com/phasehq/ai --skill docker-compose
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/phasehq/ai --skill docker-compose

简介

用于辅助云资源、部署和容器运维自动化任务。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

  • 适合检查配置、整理部署步骤或分析资源状态。
  • 通过 npx skills add 命令从 GitHub 仓库安装使用。
  • 涉及删除资源或修改网络时应先确认影响范围。
  • docker-compose 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Deploy Phase Console with Docker Compose

This skill deploys Phase Console using Docker Compose and sets up valid Let's Encrypt TLS certificates. The default Phase Docker Compose setup ships with a self-signed certificate — this skill upgrades it to a trusted Let's Encrypt certificate as part of the deployment.

The agent writes config files and runs docker/certbot commands directly. The user only handles values that require their own secrets or credentials.

Important Principles

  • Autopilot by default. Write files and run commands without asking for permission at each step. Preview generated files once before writing, then proceed.
  • Never handle secrets directly. Write .env configuration as a shell script (configure-env.sh) that auto-generates cryptographic secrets with openssl rand -hex 32 and marks OAuth credentials with # EDIT_ME. Tell the user to fill those in and run the script. Never ask the user to type secret values into the chat.
  • License key is not a secret. If the user has a Phase Enterprise license key, ask them to paste it directly into the chat.
  • Preserve nginx routing. All modifications to nginx/default.conf must keep the existing routing intact: /service/ proxies to backend:8000, / proxies to frontend:3000.
  • Reference files for details. See refs/docker-compose-deployment.md for exact file templates and commands, and refs/troubleshooting.md for diagnosing issues.

Workflow

Phase 1 — Prerequisites

Run these checks automatically without asking:

  1. which docker — if missing, tell the user to install Docker from https://docs.docker.com/engine/install/ and stop
  2. docker compose version — if missing or fails, tell the user to install the Docker Compose plugin and stop
  3. Check if Phase is already running: docker compose ps 2>/dev/null If Phase containers are already up (phase-nginx, phase-frontend, phase-backend etc.), this is an existing installation — skip Phase 2 (fresh install) and go straight to Phase 3 (Let's Encrypt setup).

Once checks pass, proceed without waiting for the user.

Phase 2 — Configuration Questions (fresh install only)

Ask all questions in a single message:

  1. Domain name — The FQDN where Phase will run (e.g., phase.example.com). Required — must be a real domain pointing to this server for Let's Encrypt to work.
  2. Email address — For Let's Encrypt certificate expiry notifications and the .env contact address.
  3. SSO provider(s) — Which identity providers to enable (comma-separated):

- google, github, gitlab, authentik - google-oidc, jumpcloud-oidc, entra-id-oidc, okta-oidc - github-enterprise

  1. Phase Enterprise license — Do they have a license key? If yes, ask them to paste it here.

Once answered, proceed to Phase 3.

Phase 3 — Let's Encrypt Setup Questions

Ask only what's needed (some may already be known from Phase 2):

  1. Domain — if not already collected
  2. Email for Let's Encrypt — if not already collected
  3. Working directory — where is the docker-compose.yml located? Default: current directory. The agent needs this to run docker compose commands with the right context.

Phase 4 — File Setup (fresh install only)

4a. Download base configs

Run automatically:

curl -o docker-compose.yml https://raw.githubusercontent.com/phasehq/console/main/docker-compose.yml
curl -o .env.example https://raw.githubusercontent.com/phasehq/console/main/.env.example
mkdir -p nginx
curl -o nginx/default.conf https://raw.githubusercontent.com/phasehq/console/main/nginx/default.conf
curl -o nginx/Dockerfile https://raw.githubusercontent.com/phasehq/console/main/nginx/Dockerfile

4b. Write configure-env.sh

Write configure-env.sh — a script the user edits and runs to produce a valid .env. Auto-generate all cryptographic secrets. Mark OAuth credentials with # EDIT_ME. See references for the full template.

Write the file and chmod +x configure-env.sh. Tell the user: "Edit the # EDIT_ME lines in configure-env.sh then run it to generate your .env. Let me know when it's done."

Wait for confirmation before proceeding.

Phase 5 — Let's Encrypt Certificate Setup

This is the core of the skill and applies to both fresh installs and existing deployments.

5a. Verify DNS

Before doing anything with certificates, verify the domain resolves to this server:

dig @8.8.8.8 {domain} +short
dig @1.1.1.1 {domain} +short
dig @9.9.9.9 {domain} +short
dig @208.67.222.222 {domain} +short

All should return the server's public IP. If any are inconsistent or NXDOMAIN, tell the user to fix DNS first and wait. Do not proceed until at least 3 of 4 resolvers agree — Let's Encrypt will fail ACME challenges on an unresolved domain.

If the user doesn't know their server's public IP:

curl -s https://api.ipify.org

5b. Patch docker-compose.yml

Add the certbot service and shared volumes to docker-compose.yml, and add volume mounts to the nginx service. See references for the exact patch. Run automatically — show a diff-style preview of what's changing before applying.

Key changes:

  • Add certbot-webroot and certbot-certs named volumes
  • Mount both into the nginx service
  • Add the certbot service definition

5c. Patch nginx/default.conf

Replace the nginx config with the Let's Encrypt-ready version from references. This version:

  • HTTP server block (port 80): serves ACME challenges at /.well-known/acme-challenge/, redirects everything else to HTTPS
  • HTTPS server block (port 443): initially still uses the self-signed cert baked into the nginx image (/etc/nginx/ssl/nginx.crt); preserves all existing routing (/service/ → backend, / → frontend)
  • Mounts the certbot webroot volume for challenge file serving

Show the full new config as a preview, then write it.

5d. Apply and restart nginx

docker compose up -d --build nginx

The --build flag is needed because the nginx Dockerfile generates the self-signed cert at build time. After this, nginx is running with:

  • Port 80: serves ACME challenges + redirects to HTTPS
  • Port 443: still using self-signed cert (temporary)

5e. Get the Let's Encrypt certificate

Run automatically:

docker compose run --rm certbot certonly \
  --webroot \
  --webroot-path=/var/www/certbot \
  --email {email} \
  --agree-tos \
  --no-eff-email \
  -d {domain}

If this fails, consult refs/troubleshooting.md for ACME challenge errors.

5f. Switch nginx to Let's Encrypt cert

Update the two ssl_certificate lines in nginx/default.conf to point to the Let's Encrypt cert paths:

ssl_certificate /etc/letsencrypt/live/{domain}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/{domain}/privkey.pem;

Then reload nginx (no restart needed — reload picks up the new cert without dropping connections):

docker compose exec nginx nginx -s reload

5g. Verify

curl -sv https://{domain}/api/health 2>&1 | grep -E "SSL|issuer|subject|expire"

Confirm the issuer is Let's Encrypt and the cert is valid.

5h. Set up auto-renewal

Write a cron job that renews the cert twice daily (Let's Encrypt certs expire in 90 days; certbot only actually renews when within 30 days):

(crontab -l 2>/dev/null; echo "0 0,12 * * * cd {working_dir} && docker compose run --rm certbot renew --quiet && docker compose exec nginx nginx -s reload") | crontab -

Show the user the installed cron entry:

crontab -l

Tell the user: "Your Phase Console is live at https://{domain} with a trusted Let's Encrypt certificate. It will auto-renew every 12 hours when within 30 days of expiry."

Phase 6 — Verification

Run automatically:

docker compose ps

All containers should show running. Check health endpoints:

curl -s https://{domain}/api/health
curl -s https://{domain}/service/health/

Both should return a 200 response. If any container is unhealthy, consult refs/troubleshooting.md.

Upgrading Phase

docker compose pull
docker compose up -d

Uninstalling

docker compose down -v   # -v removes volumes including the database

Remove certbot cron job:

crontab -l | grep -v certbot | crontab -

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.43%
按下载量换算24

Claude

29.36%
按下载量换算21

Cursor

18.05%
按下载量换算13

Gemini CLI

9.48%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

未通过

Snyk

可疑

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills