docker-redmine icon indicating copy to clipboard operation
docker-redmine copied to clipboard

only install gems if plugins exist

Open pos-ei-don opened this issue 7 years ago • 9 comments

New Instance doesn't start without Internet: Could not fetch specs from https://rubygems.org/

Installing gems required by plugins...
redmineTEST  | Could not fetch specs from https://rubygems.org/

after ~10 minutes, I get

redmineTEST exited with code 17, folowed by trying to start it again.

Is there a possibility to override this and/or use a proxy for this?

pos-ei-don avatar Aug 09 '17 10:08 pos-ei-don

... setting the enviroment-variable for the proxy worked, but disabling this would still be nice!

pos-ei-don avatar Aug 09 '17 10:08 pos-ei-don

Are you using any plugins?

jcormier avatar Aug 09 '17 13:08 jcormier

No. Even on a fresh installation with no database and no mounted volume i get this. I use mysql2 as database-driver, but database got created from the first start, so I don't think that it's this.

I used now for test sameersbn/redmine:3.4.2, but had this also with sameersbn/redmine:3.3.4

here is the console-output before it is waiting for thwe timeout.

redmineTEST | Initializing logdir...
redmineTEST | Initializing datadir...
redmineTEST | Generating OpenSSH client keys...
redmineTEST | Symlinking dotfiles...
redmineTEST | Installing configuration templates...
redmineTEST | SSL keys and certificates were not found.
redmineTEST | Assuming that the container is running behind a HTTPS enabled load balancer.
redmineTEST | Configuring redmine...
redmineTEST | Configuring redmine::database
redmineTEST | Configuring redmine::unicorn...
redmineTEST | Configuring redmine::secret_token...
redmineTEST | Configuring redmine::max_concurrent_ajax_uploads...
redmineTEST | Configuring redmine::sudo_mode...
redmineTEST | Configuring redmine::autologin_cookie...
redmineTEST | Configuring redmine::email_delivery...
redmineTEST | Configuring redmine::fetch_commits...
redmineTEST | Configuring redmine::backups...
redmineTEST | Configuring nginx...
redmineTEST | Configuring nginx::redmine...
redmineTEST | Configuring nginx::redmine::hsts...
redmineTEST | Migrating database. Please be patient, this could take a while...
redmineTEST | Installing plugins...
redmineTEST | Installing gems required by plugins...
redmineTEST | Could not fetch specs from https://rubygems.org/
redmineTEST exited with code 17

pos-ei-don avatar Aug 10 '17 06:08 pos-ei-don

If you are from china, please use china's mirror like below in pre-install.sh gem sources --add https://gems.ruby-china.org/ --remove https://rubygems.org/ bundle config mirror.https://rubygems.org https://gems.ruby-china.org

jameswangcnln78 avatar Aug 10 '17 06:08 jameswangcnln78

no, europe. hm, i should mention that my server has no internet-connection, but i want to start it anyway... ;-)

pos-ei-don avatar Aug 10 '17 06:08 pos-ei-don

redmineTEST | Installing plugins... redmineTEST | Installing gems required by plugins... redmineTEST | Could not fetch specs from https://rubygems.org/

So it looks like the install_plugins step runs bundle install regardless of you having any plugins. Since if there are no plugins theres no need to install any new gems or run the database migration. https://github.com/sameersbn/docker-redmine/blob/master/assets/runtime/functions#L951

If you want to make a pull request that only runs the install when plugins exist.

jcormier avatar Aug 10 '17 13:08 jcormier

unfortunately, I'm not a developer. so even don't know how to make a pull request, so i'm sorry, i can't help much here... but i will look into the code, maybe i find somehing useful.....

pos-ei-don avatar Aug 11 '17 18:08 pos-ei-don

@pos-ei-don it would be enought to supply information we can handle the rest but as no of us has the problem we can't dig into that our self

frank-dspeed avatar Nov 03 '17 09:11 frank-dspeed

@frank-dspeed That's true. But as a workaround, I don't think there is any reason the install_plugins function needs to call 'bundle install" if there are no plugins to install. This is something we can we can implement and test without needing to reproduce his exact problem.

https://github.com/sameersbn/docker-redmine/blob/master/assets/runtime/functions#L928

It might be as simple as returning if after the rsync the plugins directory is still empty.

I've been meaning to get to this but this past month has been very busy for me.

jcormier avatar Nov 03 '17 15:11 jcormier