feat(infra): add Heroku deployment configuration#10
Conversation
845b7e1 to
972d6bf
Compare
Add infrastructure-as-code files for deploying to Heroku: - app.json: Heroku app manifest with PostgreSQL essential-0, Basic dyno, and environment variables (BETTER_AUTH_URL set to auth.codebar.io) - Procfile: Web and release process definitions - scripts/heroku-release.sh: Release phase migration runner - HEROKU.md: Deployment documentation with automatic deploy setup - CLAUDE.md: Reference to deployment docs - package.json: Node.js version pinning (>= 24.0.0) - src/auth.js: Use BETTER_AUTH_URL env var for baseURL
972d6bf to
0df930c
Compare
| ## Prerequisites | ||
|
|
||
| - Heroku CLI installed and authenticated (`heroku login`) | ||
| - GitHub OAuth app created at https://github.com/settings/developers |
There was a problem hiding this comment.
So we need someone to add that, or grant us privileges to do it ourselves?
There was a problem hiding this comment.
We don't need to setup anything, we can ask Kimberly to extend the current app by adding (allow listing) an additional redirect URL.
| @@ -0,0 +1,114 @@ | |||
| # Heroku Deployment | |||
There was a problem hiding this comment.
This should probably go in a docs folder and be readable by humans. We are mixing concerns: deployment and initial setup.
|
Shall we do the cleanups in |
Use appConfig.base_url instead of BETTER_AUTH_URL env var. BREAKING CHANGE: Production must set CODEBAR_AUTH_URL instead of BETTER_AUTH_URL
|
Done! I've pushed follow-up commits that align this PR with the config centralization in main:
Ready for review when you are. |
|
@mroderick feel free to squash, github will show me what is new and auto resolve comments. I'll have a look after. |
Summary
Add Heroku infrastructure-as-code configuration for deploying codebar-auth to Heroku with automatic deployments from GitHub.
Changes
BETTER_AUTH_URLset tohttps://auth.codebar.iowebsiteset to custom domainBETTER_AUTH_URLenvironment variable for Better Auth baseURL (fixes production OAuth)Deployment Workflow
Standard Flow (Automatic)
mainEmergency Flow (Manual)
git push heroku main --forcefor break-the-glass situationsEnvironment Variables
DATABASE_URLGITHUB_CLIENT_IDGITHUB_CLIENT_SECRETBETTER_AUTH_SECRETBETTER_AUTH_URLInfrastructure
Setup Instructions
See HEROKU.md for:
app.jsonTesting