Skip to content

Hotfix: forward OAuth env vars from .env to the app container#16

Merged
rainxchzed merged 1 commit into
mainfrom
fix/compose-forward-oauth-env
May 15, 2026
Merged

Hotfix: forward OAuth env vars from .env to the app container#16
rainxchzed merged 1 commit into
mainfrom
fix/compose-forward-oauth-env

Conversation

@rainxchzed
Copy link
Copy Markdown
Member

Production app boots in a crash loop after #15 merged: validateProductionEnv rejects the deploy because OAUTH_CLIENT_ID, OAUTH_CLIENT_SECRET, OAUTH_SERVICE_TOKEN, OAUTH_SERVICE_ALLOWED_HOSTS, and OAUTH_WEB_CALLBACK_URL are missing from the container's environment — even though they exist in /opt/github-store-backend/.env.

Root cause: docker-compose.prod.yml uses an explicit environment: map per-service (not env_file:). ${VAR} substitution at compose-parse-time only inlines variables that are listed in the map. PR #15 added the 5 new env vars to validateProductionEnv + .env.example but not to the prod compose file.

This hotfix:

Dev docker-compose.yml intentionally untouched — APP_ENV != production there, so validateProductionEnv is a no-op and the legacy minimal env config still works for local dev.

Verification

$ docker compose -f docker-compose.prod.yml config | grep -E "OAUTH_"
      OAUTH_CLEANUP_DISABLED: ""
      OAUTH_CLIENT_ID: ""
      OAUTH_CLIENT_SECRET: ""
      OAUTH_SERVICE_ALLOWED_HOSTS: ""
      OAUTH_SERVICE_TOKEN: ""
      OAUTH_WEB_CALLBACK_URL: ""

Empty because the laptop has no .env; on the VPS those slots fill from /opt/github-store-backend/.env.

After this lands and auto-deploy fires, the app boots once the operator restarts the container with --force-recreate (or the deploy workflow does that automatically by virtue of compose detecting the file change).

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rainxchzed has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 15, 2026

Warning

Rate limit exceeded

@rainxchzed has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 37 minutes and 30 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2b9b6323-a693-44e5-b901-0b2e67e50d38

📥 Commits

Reviewing files that changed from the base of the PR and between 8680eb5 and e12d0f3.

📒 Files selected for processing (1)
  • docker-compose.prod.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/compose-forward-oauth-env

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@rainxchzed rainxchzed merged commit 882261a into main May 15, 2026
2 checks passed
@rainxchzed rainxchzed deleted the fix/compose-forward-oauth-env branch May 15, 2026 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant