npx skills add https://github.com/incept5/eve-skillpacks --skill eve-local-dev-loop使用此技能在本地通过 Docker Compose 运行和测试应用,然后交由 Eve 进行预发布环境部署。
compose.yaml 或 docker-compose.yml 文件。.eve/manifest.yaml)中定义了相同的服务和端口。# 启动本地服务(数据库 + 迁移)
docker compose up -d
# 以开发模式启动 API(热重载)
cd apps/api && npm run dev
# 以开发模式启动 Web 应用(使用 /api 代理的 Vite 开发服务器)
cd apps/web && npm run dev
# 查看数据库日志
docker compose logs -f
# 重置数据库(删除 + 重建 + 迁移)
docker compose down -v && docker compose up -d
在本地使用 Eve-migrate 镜像,以确保与预发布环境的迁移行为一致:
services:
db:
image: postgres:16-alpine
ports:
- "5432:5432"
environment:
POSTGRES_USER: app
POSTGRES_PASSWORD: app
POSTGRES_DB: myapp
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U app -d myapp"]
interval: 5s
timeout: 5s
retries: 5
migrate:
image: ghcr.io/incept5/eve-migrate:latest
environment:
DATABASE_URL: postgres://app:app@db:5432/myapp
volumes:
- ./db/migrations:/migrations:ro
depends_on:
db:
condition: service_healthy
volumes:
pgdata:
Use this skill to run and test the app locally with Docker Compose, then hand off to Eve for staging deploys.
compose.yaml or docker-compose.yml exists in the repo..eve/manifest.yaml) reflects the same services and ports.# Start local services (DB + migrations)
docker compose up -d
# Start API in dev mode (hot reload)
cd apps/api && npm run dev
# Start web in dev mode (Vite dev server with /api proxy)
cd apps/web && npm run dev
# View DB logs
docker compose logs -f
# Reset DB (drop + recreate + migrate)
docker compose down -v && docker compose up -d
Use the Eve-migrate image locally for migration parity with staging:
services:
db:
image: postgres:16-alpine
ports:
- "5432:5432"
environment:
POSTGRES_USER: app
POSTGRES_PASSWORD: app
POSTGRES_DB: myapp
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U app -d myapp"]
interval: 5s
timeout: 5s
retries: 5
migrate:
image: ghcr.io/incept5/eve-migrate:latest
environment:
DATABASE_URL: postgres://app:app@db:5432/myapp
volumes:
- ./db/migrations:/migrations:ro
depends_on:
db:
condition: service_healthy
volumes:
pgdata:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
为何使用 eve-migrate? 相同的运行器在本地和预发布环境都会执行,确保了迁移行为的一致性。它会在 schema_migrations 表中追踪已应用的迁移(幂等、带校验和、事务性)。迁移文件是带时间戳前缀的纯 SQL 文件,例如:20260312000000_initial_schema.sql。
添加新迁移文件后,手动运行迁移:
docker compose run --rm migrate
db 服务对应清单中的托管数据库。在本地它是一个容器;在预发布环境,由 Eve 负责配置。migrate 服务对应清单中的 migrate 任务。两者都使用 eve-migrate 并挂载 db/migrations/ 目录。x-eve.ingress.public: true。${secret.KEY} 语法,并将本地值保存在 .eve/dev-secrets.yaml 中。.env 文件(例如,DATABASE_URL=postgresql://app:app@localhost:5432/myapp)。.env 中,将用于清单插值的变量放在 .eve/dev-secrets.yaml 中。.eve/dev-secrets.yaml 添加到 .gitignore 中。vite.config.ts 中配置代理,将 /api 请求转发到 http://localhost:3000(以匹配生产环境中的 nginx 代理模式)。# 确保配置文件和认证已设置
eve profile use staging
eve auth status
# 设置必需的密钥
eve secrets set API_KEY "value" --project proj_xxx
# 部署到预发布环境(需要 --ref 参数,指定 40 位字符的 SHA 或相对于 --repo-dir 的引用)
eve env deploy staging --ref main --repo-dir .
# 如果环境配置了流水线,此命令将触发流水线。
# 使用 --direct 参数绕过流水线直接部署:
eve env deploy staging --ref main --repo-dir . --direct
追踪部署任务:
eve job list --phase active
eve job follow <job-id>
eve job result <job-id>
eve secrets list)。eve job diagnose <job-id> 获取失败详情。每周安装量
158
代码仓库
首次出现
2026年2月8日
安全审计
安装于
gemini-cli158
codex158
claude-code157
pi62
opencode37
codebuddy37
Why eve-migrate? The same runner executes in both local and staging, giving migration parity. It tracks applied migrations in schema_migrations (idempotent, checksummed, transactional). Plain SQL files with timestamp prefixes: 20260312000000_initial_schema.sql.
Run migrations manually after adding a new file:
docker compose run --rm migrate
db service mirrors the manifest's managed DB. Locally it's a container; in staging, Eve provisions it.migrate service mirrors the manifest's migrate job. Both use eve-migrate and mount db/migrations/.x-eve.ingress.public: true in the manifest.${secret.KEY} in the manifest and keep local values in .eve/dev-secrets.yaml..env for the API (e.g., DATABASE_URL=postgresql://app:app@localhost:5432/myapp)..env for Compose and .eve/dev-secrets.yaml for manifest interpolation..eve/dev-secrets.yaml in .gitignore.vite.config.ts to forward /api to http://localhost:3000 (matching the nginx proxy pattern in production).# Ensure profile and auth are set
eve profile use staging
eve auth status
# Set required secrets
eve secrets set API_KEY "value" --project proj_xxx
# Deploy to staging (requires --ref with 40-char SHA or a ref resolved against --repo-dir)
eve env deploy staging --ref main --repo-dir .
# If the environment has a pipeline configured, this triggers the pipeline.
# Use --direct to bypass pipeline and deploy directly:
eve env deploy staging --ref main --repo-dir . --direct
Track the deploy job:
eve job list --phase active
eve job follow <job-id>
eve job result <job-id>
eve secrets list).eve job diagnose <job-id> for failure details.Weekly Installs
158
Repository
First Seen
Feb 8, 2026
Security Audits
Installed on
gemini-cli158
codex158
claude-code157
pi62
opencode37
codebuddy37