Token导航 LogoToken导航TokenDH.com
运维和基础设施敏感数据github未标认证来源可访问许可证需确认审计通过

constructive-deployment建设性部署

Agent Skill

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

总安装

399

周安装

16

GitHub Stars

公开资料未说明

下载量

129
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/constructive-io/constructive-skills --skill constructive-deployment

简介

用于本地开发和生产部署 Constructive 平台,涵盖 Docker Compose、数据库迁移等。

  • 支持运行服务容器、构建镜像及执行数据库迁移任务。
  • 适用于理解 Makefile 目标和整体架构,辅助运维自动化流程。
  • 需具备 Docker、Node.js 和 pgpm CLI 环境,区分开发与生产操作风险。
  • constructive-deployment 属于运维和基础设施类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Constructive Deployment

How to deploy the Constructive platform — local development with Docker Compose, database migrations with pgpm, and production container builds.

When to Apply

Use this skill when:

  • Setting up the Constructive monorepo for local development
  • Running Docker Compose services (Postgres, MinIO, API servers)
  • Building the Constructive Docker image
  • Deploying database migrations to local or remote Postgres
  • Understanding the Makefile targets and service architecture

Local Development Setup

Prerequisites

  • Docker and Docker Compose
  • Node.js 22+ with pnpm
  • pgpm CLI (available from the constructive monorepo)

Quick Start

# 1. Start Postgres and MinIO containers
make up
# OR: docker-compose up -d

# 2. Bootstrap database roles (ensure PG env vars are loaded — see pgpm skill, references/env.md)
pgpm admin-users bootstrap --yes

# 3. Deploy all database modules
pgpm deploy --createdb --workspace --all --yes

Stopping

# Stop and remove containers + volumes
make down
# OR: docker-compose down -v

Docker Compose Services

Core Services (docker-compose.yml)

ServiceContainerImagePortPurpose
postgrespostgresghcr.io/constructive-io/docker/postgres-plus:175432PostgreSQL database
miniominiominio/minio9000S3-compatible object storage

Postgres credentials: postgres / password (local dev only)

Application Services (docker-compose.jobs.yml)

ServiceContainerPortPurpose
constructive-admin-serverconstructive-admin-server3002Internal admin GraphQL API (header-based routing)
constructive-serverconstructive-server3000Public GraphQL API (domain-based routing)
send-email-linksend-email-linkEmail function (invite, password reset, verification)

Running Application Services

The application services require a built Docker image:

# Build the constructive image
docker-compose -f docker-compose.jobs.yml build

# Start all application services
docker-compose -f docker-compose.jobs.yml up -d

Postgres Images

ImageUse Case
ghcr.io/constructive-io/docker/postgres-plus:17Recommended — includes all extensions needed by constructive
pyramation/postgres:17Lightweight alternative with common extensions

PostgreSQL 17+ is required for security_invoker views. Older images will fail with "unrecognized parameter security_invoker" errors.

Database Deployment

Deploy to Local Database

Prerequisite: Ensure PostgreSQL is running and PG env vars are loaded. See pgpm skill (references/docker.md) and pgpm skill (references/env.md).
pgpm deploy --createdb --workspace --all --yes

Deploy to Remote Database

Point pgpm at a remote Postgres instance via environment variables:

export PGHOST=remote-host.example.com
export PGPORT=5432
export PGUSER=postgres
export PGPASSWORD=secure-password
export PGDATABASE=constructive

pgpm deploy --workspace --all --yes

Verify Deployment

pgpm verify

Revert (Rollback)

# Revert last change
pgpm revert --yes

# Revert to a tagged release
pgpm revert --to @v1.0.0 --yes

# Revert everything
pgpm revert --all --yes

Docker Image Build

The Constructive monorepo builds a multi-stage Docker image:

Build Stages

  1. build stage — Node.js 22, installs pnpm, runs pnpm install --frozen-lockfile and pnpm run build
  2. constructive stage — Runtime image with built artifacts, PostgreSQL client, and CLI shims

CLI Shims

The Docker image exposes three CLI commands:

CommandMaps To
constructivenode /app/packages/cli/dist/index.js
cncnode /app/packages/cli/dist/index.js
pgpmnode /app/pgpm/pgpm/dist/index.js

Building Locally

docker build -t constructive:dev .

Makefile Targets

TargetCommandPurpose
make updocker-compose up -dStart Postgres + MinIO
make downdocker-compose down -vStop and clean up
make sshdocker exec -it postgres /bin/bashShell into Postgres container
make rolespgpm admin-users bootstrap/addBootstrap database roles
make installdocker exec postgres /sql-bin/install.shRun install script in container

Environment Variables

Server Configuration

VariableDescriptionExample
API_IS_PUBLICtrue for public API, false for admin (header-based)true
API_EXPOSED_SCHEMASComma-separated schemas to expose via GraphQLmetaschema_public,services_public
API_ANON_ROLEPostgreSQL role for unauthenticated requestsanonymous
API_ROLE_NAMEPostgreSQL role for authenticated requestsauthenticated
API_ENABLE_SERVICESEnable services schema (admin only)true
API_META_SCHEMASMeta schemas for validation and routingmetaschema_public,services_public
SERVER_HOSTServer bind address0.0.0.0
SERVER_ORIGINCORS origin*
SERVER_TRUST_PROXYTrust reverse proxy headerstrue
SERVER_STRICT_AUTHEnforce strict authenticationfalse

Database Connection

VariableDescriptionDefault
PGHOSTPostgreSQL hostlocalhost
PGPORTPostgreSQL port5432
PGUSERPostgreSQL userpostgres
PGPASSWORDPostgreSQL passwordpassword
PGDATABASETarget database name

Admin vs Public API

The Constructive platform runs two API servers:

  • Admin server (API_IS_PUBLIC=false, port 3002) — uses header-based routing (X-Api-Name, X-Database-Id, X-Meta-Schema). Used internally by the Constructive admin UI.
  • Public server (API_IS_PUBLIC=true, port 3000) — uses domain-based routing. Serves external client applications.

Networking

All Docker Compose services share the constructive-net network, allowing inter-service communication by container name (e.g., postgres:5432 from within the constructive-server container).

Troubleshooting

IssueCauseFix
Port 5432 in useAnother Postgres instance runningStop it or change the port in docker-compose.yml
security_invoker errorPostgres version < 17Use postgres-plus:17 or pyramation/postgres:17 image
role "authenticated" does not existMissing bootstrapRun pgpm admin-users bootstrap --yes
Container not on networkNetwork mismatchCheck docker network ls for constructive-net
Build fails at pnpm installLockfile mismatchRun pnpm install locally first to update lockfile

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

33.79%
按下载量换算44

Claude

33.61%
按下载量换算43

Cursor

19.84%
按下载量换算26

Gemini CLI

9.13%
按下载量换算12

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

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

安装前确认

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

来源信息

继续浏览同类 Skills