-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide an option to skip orm hooks #1668
base: main
Are you sure you want to change the base?
Conversation
Hey @cwjenkins , thanks for your contribution! It looks a little bit odd for me to introduce such a config option for such case.. What log do you see while compiling the assets in docker ? |
Hey @nbulaj, it attempts to make a database connection causing the compilation step to fail given assets being compiled occurs during CI/CD where no DB connection exists. |
Will be great to understand at what step it tried to connect to the DB and why it requires that step @cwjenkins . In such case we can think how to make it lazy evaluatable (btw it should be already 🤔 ) |
Thanks @nbulaj.
|
Hey @nbulaj any interest in providing a way to exclude AR initialization ? |
Yeah, but I believe it shouldn't be a config option. We have to change autoloading to be fully lazy-evaluatable so it won't affect anything in Docker or in any other env |
Summary
Currently trying to dockerize an application that contains doorkeeper and upon running assets precompilation it wants
a database connectionto evaluate database.yml config.This provides a way to skip the orm hooks.