Make API keys optional with defaults in settings - #56
Closed
railway-app[bot] wants to merge 1 commit into
Closed
railway-app[bot] wants to merge 1 commit into
railway-app[bot] wants to merge 1 commit into
Conversation
## Problem The Celery worker service crashed on startup because `config/settings.py` required all API keys (GOOGLE_AI_API_KEY, GROQ_API_KEY, ANTHROPIC_API_KEY, COHERE_API_KEY, etc.) to be defined without defaults. This is problematic because: 1. The worker loads Django settings but doesn't use all API keys 2. Different services may need different API keys 3. Missing optional keys should not crash the app ## Solution Changed all optional API keys and service-specific variables to use `default=""` (empty string) instead of requiring them: - GOOGLE_AI_API_KEY - GROQ_API_KEY - ANTHROPIC_API_KEY - COHERE_API_KEY - All Stripe configuration - Email configuration - Google OAuth This allows both the web service and worker to start regardless of which keys are configured, while still supporting these features when the keys are provided. ## Changes - Updated `backend/config/settings.py` to add `default=""` to all optional API keys and service-specific variables - Kept `SECRET_KEY` required (as it should be) - Kept `DATABASE_URL` required (as it should be) - Made Supabase storage keys optional (only required when USE_SUPABASE_STORAGE is True)
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
railway-app
Bot
temporarily deployed
to
terrific-spontaneity / production
September 7, 2026 03:35
Inactive
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Celery worker service crashed on startup because
config/settings.pyrequired all API keys (GOOGLE_AI_API_KEY, GROQ_API_KEY, ANTHROPIC_API_KEY, COHERE_API_KEY, etc.) to be defined without defaults. This is problematic because:Solution
Changed all optional API keys and service-specific variables to use
default=""(empty string) instead of requiring them:This allows both the web service and worker to start regardless of which keys are configured, while still supporting these features when the keys are provided.
Changes
backend/config/settings.pyto adddefault=""to all optional API keys and service-specific variablesSECRET_KEYrequired (as it should be)DATABASE_URLrequired (as it should be)