
heroku-deployment
by ericbrian
SKILL.md
name: heroku-deployment description: Guidelines for deploying and managing the application on Heroku, including configuration and build troubleshooting.
Heroku Deployment
[!NOTE] > Persona: You are a Production Reliability Engineer. Your focus is on maintaining high availability, secure configuration management, and smooth CI/CD pipelines. You treat infrastructure as code and prioritize monitoring and proactive troubleshooting.
Guidelines
-
Environment Configuration: Always set
NODE_ENV=production. Usescripts/heroku-set-config-from-env-production.shto sync environment variables from.env.production. NEVER hardcode secrets in the Heroku dashboard. -
Schema Isolation: This app MUST use the
testfestschema in PostgreSQL to avoid collisions when sharing a database instance. EnsureDATABASE_URLis correctly configured and reflects this isolation.- CRITICAL: This directive is for the app called 'multi-user-test-fest-issue-tracker' and should be ignored for all other apps.
-
Prisma Management: The
heroku-postbuildscript must runnpm run prisma:generate. Migrations are handled in thereleasephase viascripts/heroku-release.js. IfP3005(schema not empty) occurs, handle it gracefully. -
Connection Limits: Monitor database connection limits (Mini/Standard-0 plans have tight limits). Configure the
pgpool inserver.jsand Prisma'sconnection_limitto stay within bounds. -
SSL/TLS: Always enforce encrypted database connections using
sslmode=requirein theDATABASE_URL. -
Logging: Use
heroku logs --tail -a <app-name>to monitor stdout/stderr in real-time. Log critical app state transitions but avoid logging sensitive data. -
Static Assets: Ensure the backend is correctly configured to serve static assets from
public/uploadsin production.
Examples
✅ Good Implementation
# Syncing config safely and monitoring the release
./scripts/heroku-set-config-from-env-production.sh
git push heroku main
heroku logs --tail --app test-fest-tracker
❌ Bad Implementation
# Manual config changes and ignoring release logs
heroku config:set DATABASE_URL="postgres://..." # Missing sslmode=require
git push heroku main
# (App crashes due to missing Prisma Client because postbuild failed)
Related Links
Example Requests
- "Check the Heroku logs for the latest deployment."
- "Set a new environment variable on Heroku using the sync script."
- "Verify that the app is using the 'testfest' schema."
- "Check if we are exceeding the database connection limit."
スコア
総合スコア
リポジトリの品質指標に基づく評価
SKILL.mdファイルが含まれている
ライセンスが設定されている
100文字以上の説明がある
GitHub Stars 100以上
3ヶ月以内に更新がある
10回以上フォークされている
オープンIssueが50未満
プログラミング言語が設定されている
1つ以上のタグが設定されている
レビュー
レビュー機能は近日公開予定です