Is your feature request related to a problem? Please describe.
Recently in the 3.0.0 branch when I do a full setup as in spinning up a new docker environment which calls rails webpacker:install in building the image fails because the database has not been setup. This im still trying to figure out, but to get around that i just commented out my entire config/initializers/rails_admin.rb and was able to build the docker image as normal. After deploying I forgot to un-comment out the config and the /admin was exposed to the world. Luckily I realized that shortly after and before any data was seeded.
Describe proposed solution(s)
If the config has not been specified to use a specific authenticate_with/authorize_with limit to only requests on local ip address.
Error from docker build
Removing intermediate container d7fc0f8754b1
---> dff62f437d14
Step 11/12 : run rails webpacker:install
---> Running in e6e87e2604d1
rails aborted!
ActiveRecord::ConnectionNotEstablished: could not translate host name "db" to address: Name or service not known
/app/config/initializers/rails_admin.rb:135:in `block in <main>'
/app/config/environment.rb:5:in `<main>'
Caused by:
PG::ConnectionBad: could not translate host name "db" to address: Name or service not known
/app/config/initializers/rails_admin.rb:135:in `block in <main>'
/app/config/environment.rb:5:in `<main>'
Tasks: TOP => app:template => environment
(See full trace by running task with --trace)
ERROR: Service 'jobs' failed to build: The command '/bin/sh -c rails webpacker:install' returned a non-zero code: 1
rails_admin.rb:135
config.model Delayed::Job do
label 'Jobs'
navigation_label 'System'
show do
field :priority
field :attempts
field :handler do
pretty_value do
"<pre class='blah'>#{value}</pre >".html_safe
end
end
field :last_error do
pretty_value do
"<pre class='blah'>#{value}</pre >".html_safe
end
end
field :run_at
field :locked_at
field :failed_at
field :locked_by
field :queue
end
end
Is your feature request related to a problem? Please describe.
Recently in the 3.0.0 branch when I do a full setup as in spinning up a new docker environment which calls
rails webpacker:installin building the image fails because the database has not been setup. This im still trying to figure out, but to get around that i just commented out my entire config/initializers/rails_admin.rb and was able to build the docker image as normal. After deploying I forgot to un-comment out the config and the /admin was exposed to the world. Luckily I realized that shortly after and before any data was seeded.Describe proposed solution(s)
If the config has not been specified to use a specific authenticate_with/authorize_with limit to only requests on local ip address.
Error from docker build
rails_admin.rb:135