用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/takemo101/compose-workflow --skill tech-stack-configs命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | tech-stack-configs |
| description | container-use環境の技術スタック別設定例とDBマイグレーションテスト手順 |
container-use環境で各技術スタックを使用するための設定例とDBマイグレーションテスト手順。
config = {
"base_image": "node:20-slim",
"setup_commands": [
"npm ci",
"npx playwright install chromium --with-deps"
],
"envs": [
"NODE_ENV=test",
"DATABASE_URL=postgresql://app:password@postgres:5432/testdb"
]
}
config = {
"base_image": "python:3.11-slim",
"setup_commands": [
"pip install --no-cache-dir -r requirements.txt",
"pip install --no-cache-dir -r requirements-dev.txt"
],
"envs": [
"PYTHONPATH=/workspace",
"DATABASE_URL=postgresql://app:password@postgres:5432/testdb"
]
}
config = {
"base_image": "golang:1.21-alpine",
"setup_commands": [
"go mod download",
"go install github.com/golang-migrate/migrate/v4/cmd/migrate@latest"
],
"envs": [
"CGO_ENABLED=0",
"DATABASE_URL=postgres://app:password@postgres:5432/testdb?sslmode=disable"
]
}
config = {
"base_image": "rust:1.85-slim",
"setup_commands": [
"cargo fetch",
"cargo build --release"
],
"envs": [
"DATABASE_URL=postgres://app:password@postgres:5432/testdb"
]
}
container-use_environment_add_service(
environment_source="/path/to/repo",
environment_id=env_id,
name="postgres",
image="postgres:15-alpine",
envs=[
"POSTGRES_USER=app",
"POSTGRES_PASSWORD=password",
"POSTGRES_DB=testdb"
],
ports=[5432],
explanation="Add PostgreSQL for database tests"
)
container-use_environment_add_service(
environment_source="/path/to/repo",
environment_id=env_id,
name="mysql",
image="mysql:8",
envs=[
"MYSQL_ROOT_PASSWORD=root",
"MYSQL_DATABASE=testdb",
"MYSQL_USER=app",
"MYSQL_PASSWORD=password"
],
ports=[3306],
explanation="Add MySQL for database tests"
)
container-use_environment_add_service(
environment_source="/path/to/repo",
environment_id=env_id,
name="redis",
image="redis:7-alpine",
ports=[6379],
explanation="Add Redis for caching tests"
)
# マイグレーション実行
container-use_environment_run_cmd(
environment_id=env_id,
environment_source="/path/to/repo",
command="flyway -url=jdbc:postgresql://postgres:5432/testdb -user=app -password=password migrate",
explanation="Run Flyway migrations"
)
# ロールバック
container-use_environment_run_cmd(
environment_id=env_id,
environment_source="/path/to/repo",
command="flyway -url=jdbc:postgresql://postgres:5432/testdb -user=app -password=password undo",
explanation="Rollback last migration"
)
# マイグレーション実行
container-use_environment_run_cmd(
environment_id=env_id,
environment_source="/path/to/repo",
command="npx prisma migrate deploy",
explanation="Run Prisma migrations"
)
# リセット (開発用)
container-use_environment_run_cmd(
environment_id=env_id,
environment_source="/path/to/repo",
command="npx prisma migrate reset --force",
explanation="Reset database and rerun migrations"
)
# マイグレーション実行
container-use_environment_run_cmd(
environment_id=env_id,
environment_source="/path/to/repo",
command="alembic upgrade head",
explanation="Run Alembic migrations"
)
# ロールバック
container-use_environment_run_cmd(
environment_id=env_id,
environment_source="/path/to/repo",
command="alembic downgrade -1",
explanation="Rollback one migration"
)
# PostgreSQL起動待ち
container-use_environment_run_cmd(
environment_id=env_id,
environment_source="/path/to/repo",
command="until pg_isready -h postgres -p 5432; do sleep 1; done",
explanation="Wait for PostgreSQL to be ready"
)
# MySQL起動待ち
container-use_environment_run_cmd(
environment_id=env_id,
environment_source="/path/to/repo",
command="until mysqladmin ping -h mysql --silent; do sleep 1; done",
explanation="Wait for MySQL to be ready"
)
# Redis起動待ち
container-use_environment_run_cmd(
environment_id=env_id,
environment_source="/path/to/repo",
command="until redis-cli -h redis ping; do sleep 1; done",
explanation="Wait for Redis to be ready"
)
一部のnpmパッケージはネイティブモジュールのビルドが必要です:
config = {
"base_image": "node:20-slim",
"setup_commands": [
"apt-get update && apt-get install -y build-essential python3",
"npm ci"
]
}
| パッケージ | 必要なパッケージ |
|---|---|
bcrypt | build-essential, python3 |
canvas | libcairo2-dev, libpango1.0-dev |
sharp | libvips-dev |
sqlite3 | build-essential, python3 |