Skip to content
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

only install gems if plugins exist #298

Open
pos-ei-don opened this issue Aug 9, 2017 · 9 comments
Open

only install gems if plugins exist #298

pos-ei-don opened this issue Aug 9, 2017 · 9 comments

Comments

@pos-ei-don
Copy link

pos-ei-don commented Aug 9, 2017

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
Copy link
Author

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

@jcormier
Copy link
Collaborator

jcormier commented Aug 9, 2017

Are you using any plugins?

@pos-ei-don
Copy link
Author

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

@jameswangcnln78
Copy link

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

@pos-ei-don
Copy link
Author

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

@jcormier
Copy link
Collaborator

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.

@frank-dspeed frank-dspeed changed the title New Instance doesn't start without Internet: Could not fetch specs from https://rubygems.org/ only install gems if plugins exist Aug 10, 2017
@frank-dspeed frank-dspeed self-assigned this Aug 10, 2017
@frank-dspeed frank-dspeed added this to the 3.5.x milestone Aug 10, 2017
@pos-ei-don
Copy link
Author

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.....

@frank-dspeed frank-dspeed modified the milestones: 3.5.x, 3.4.3 Nov 3, 2017
@frank-dspeed
Copy link
Collaborator

@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

@jcormier
Copy link
Collaborator

jcormier commented Nov 3, 2017

@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 jcormier self-assigned this Nov 3, 2017
@frank-dspeed frank-dspeed modified the milestones: 3.4.3, 3.5.x Dec 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants