Provide an option to skip orm hooks#1668
Provide an option to skip orm hooks#1668cwjenkins wants to merge 1 commit intodoorkeeper-gem:mainfrom
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.