Skip to content

Fix Alembic startup by making dotenv loading optional#46

Merged
brianwalborn merged 1 commit intomainfrom
fix/migration-dotenv-deadlock
Mar 26, 2026
Merged

Fix Alembic startup by making dotenv loading optional#46
brianwalborn merged 1 commit intomainfrom
fix/migration-dotenv-deadlock

Conversation

@brianwalborn
Copy link
Copy Markdown
Owner

This pull request updates the environment variable loading logic in the backend/app/database.py file to make the application startup more robust, especially in Docker environments. The new approach avoids failures if the .env file is missing when environment variables are already provided.

Environment variable loading improvements:

  • Added a _load_env_file function that loads the .env file only if the DATABASE_URL environment variable is not already set, and gracefully handles missing .env files to prevent startup failures. (backend/app/database.py)

@brianwalborn brianwalborn merged commit 5d58fcd into main Mar 26, 2026
@brianwalborn brianwalborn deleted the fix/migration-dotenv-deadlock branch March 26, 2026 00:48
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