スキル一覧に戻る
Smarter-Poker

deployment-devops

by Smarter-Poker

Smarter-Poker-World-Hub

0🍴 0📅 2026年1月26日
GitHubで見るManusで実行

SKILL.md


name: Deployment & DevOps description: Deploy to production with Vercel and manage environment

Deployment & DevOps Skill

Overview

Deploy the Smarter.Poker platform to production using Vercel and manage the environment.

Auto-Publish Workflow

Steps (Mandatory after code changes)

# 1. Build
npm run build

# 2. Commit
git add -A && git commit -m "[description]"

# 3. Push
git push origin main

# 4. Deploy
vercel --prod

# 5. Verify
curl -s "https://smarter.poker/" | grep -o "buildId[^,]*"

Environment Variables

Required in Vercel

NEXT_PUBLIC_SUPABASE_URL=https://xxx.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGc...
SUPABASE_SERVICE_ROLE_KEY=eyJhbGc...
OPENAI_API_KEY=sk-...

Local (.env.local)

NEXT_PUBLIC_SUPABASE_URL=https://xxx.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGc...
SUPABASE_SERVICE_ROLE_KEY=eyJhbGc...
OPENAI_API_KEY=sk-...

Domain Configuration

Production

  • Primary: smarter.poker
  • Redirect: www.smarter.pokersmarter.poker

Middleware (middleware.js)

export function middleware(request) {
  const host = request.headers.get('host') || '';
  
  // Redirect www to non-www
  if (host.startsWith('www.')) {
    return NextResponse.redirect(
      new URL(request.url.replace('www.', ''))
    );
  }
  
  return NextResponse.next();
}

Cron Jobs (Vercel)

Configure in vercel.json

{
  "crons": [
    {
      "path": "/api/cron/horses-clips",
      "schedule": "0 * * * *"
    },
    {
      "path": "/api/cron/horses-news",
      "schedule": "0 8,20 * * *"
    },
    {
      "path": "/api/cron/horses-memes",
      "schedule": "0 6,14,22 * * *"
    }
  ]
}

Build Optimization

next.config.js

module.exports = {
  reactStrictMode: false,  // Required for Supabase auth
  images: {
    domains: ['xxx.supabase.co'],
    unoptimized: false
  },
  experimental: {
    optimizeCss: true
  }
};

Monitoring

Check Build Status

vercel ls

View Logs

vercel logs smarter.poker --follow

Rollback

vercel rollback

Troubleshooting

Build Fails

  1. Check npm run build locally first
  2. Review Vercel build logs
  3. Check for missing env vars

404 on Routes

  • Ensure pages exist in /pages/
  • Check for dynamic route issues

API Timeout

  • Vercel serverless has 10s limit (free), 60s (pro)
  • Move long operations to background jobs

Cache Issues

  1. Redeploy: vercel --prod --force
  2. Purge CDN cache in Vercel dashboard
  3. Test in incognito/hard refresh

Security Checklist

  • No secrets in client-side code
  • Service role key only in API routes
  • RLS enabled on all tables
  • CORS configured properly

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です