nextjs-better-auth-postgres-docker
Skill8 starsChanged 7 months agoMITView on GitHub
Next.js + Better Auth + PostgreSQL を Docker で構築し、Cloud Run へデプロイするスキル。ローカル開発環境のセットアップから Docker Compose、Dockerfile 作成、Cloud Run + Cloud SQL + Secret Manager を使った本番デプロイまでをカバーする。「Next.js と Better Auth でアプリを作りたい」「Docker で PostgreSQL を使いたい」「Docker で構築したい」「Docker Compose を使いたい」「アプリを Docker 化したい」「Dockerfile を書きたい」「Cloud Run にデプロイしたい」「Cloud SQL や Secret Manager を使いたい」ときに使う。
In this repository10 other files it gives its agents.
- claude-md-managerSkill
- codebase-onboardingSkill
- coding-rulesSkill
- design-md-generatorSkill
- flutter-riverpod-archSkill
- image-compressorSkill
- knowledge-graph-initSkill
- media-transcriberSkill
- meti-ai-guidelineSkill
- nano-banana-image-genSkill
The file
Files
Next.js + Better Auth + PostgreSQL + Docker
Next.js App Router + Better Auth + PostgreSQL を Docker で構築し、Cloud Run へデプロイするためのスキルです。
対象スタック
- フレームワーク: Next.js (App Router, TypeScript)
- 認証: Better Auth
- DB: PostgreSQL 16
- パッケージマネージャ: pnpm
- インフラ: Docker / Docker Compose、Google Cloud Run、Cloud SQL、Secret Manager
参照ドキュメント
詳細な手順は以下の reference ファイルに分けています。
| ファイル | 内容 |
references/local-setup.md | ローカル開発環境の構築(Docker Compose + アプリ Docker 化まで) |
references/cloud-run-deploy.md | Cloud Run へのデプロイ(Cloud SQL + Secret Manager 使用) |
どちらを参照するか
- ローカル環境を構築したい →
references/local-setup.mdを読む - Cloud Run にデプロイしたい →
references/cloud-run-deploy.mdを読む - 両方やりたい →
local-setup.mdを完了してからcloud-run-deploy.mdに進む
環境変数の切り替えまとめ
実行環境によって値が変わる変数を把握しておく。
| 変数名 | ローカル直実行 | Docker Compose (app コンテナ) | Cloud Run |
DATABASE_URL のホスト | localhost | db | Cloud SQL Unix socket |
BETTER_AUTH_URL | http://localhost:3000 | http://localhost:3000 | Cloud Run サービス URL |
INTERNAL_API_BASE_URL | http://localhost:3000 | http://app:3000 | Cloud Run サービス URL |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

