-
Notifications
You must be signed in to change notification settings - Fork 4
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
Run app via Procfile #642
Run app via Procfile #642
Conversation
Rails is not currently compatible with pg 1.0 and this will break if we do a bundle update.
Gemfile
Outdated
@@ -3,6 +3,7 @@ source 'https://rubygems.org' | |||
gem 'rails', '5.1.4' | |||
|
|||
gem 'bootstrap-kaminari-views', '~> 0.0.5' | |||
gem 'foreman', '~> 0.84' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's this being used for? I know nothing about foreman, other than what I've just read on the project page [1], and one of the first things that says is "Ruby users should take care not to install foreman in their project's Gemfile.". I've got nothing against doing something different, but it would be good to know why?
No problem. It's used as a means to launch the processes of the application. The comment they have in the readme seems to all trace back to this which all seems tied around problems with ruby version - It seems to be an ongoing point of contention with the project: ddollar/foreman#573, ddollar/foreman#678 I think the alternatives to having it in the Gemfile are all a bit messier. We'd have to manage it as a separate dependency in the Dockerfile (with a A suggestion from @thomasleese is to put it as a govuk_app_config dependency since it's quite related to unicorn. Another approach that occurred to me is that we can have it defined as |
So, on the GOV.UK specific downsides, I see:
Anyway, I have very different standards and opinions regarding best practices for package management, so I'm not going to stand in the way of this change. |
This requires a bundle update to sort common dependency versions so a few other deps have been bumped in the process.
This also updates startup.sh to run foreman start which will run both the web app and the sidekiq worker.
@cbaines Thanks for the approval. You're correct on both of those downsides. The impact of the thor one is pretty minimal as I believe it's used by rails generator - there's PRs open for thor update on foreman so hopefully that'll go through soon and that downside will be cleared up. As for the application in general, it is not necessary but a convenience layer - in production for running workers we're currently grepping the Procfile to run a command from it, which arguably would be nicer to just be able to run a pre-defined command. I'm going to have a little ponder over this though so may leave it open for a short while. |
Closed in favour of #654 |
This allows the dev environment and e2e tests to be able to run this app in a very similar manner to production by using the procfile.
Also updates startup.sh to run workers as well as web.