Skip to content
This repository has been archived by the owner. It is now read-only.

Add details about running guide on VM #26

Merged
merged 3 commits into from Mar 7, 2016
Merged

Add details about running guide on VM #26

merged 3 commits into from Mar 7, 2016

Conversation

@fofr
Copy link
Contributor

@fofr fofr commented Jan 11, 2016

Running bundle exec rails s binds to localhost, and this isn’t accessible from outside of the machine. Instead bind to 0.0.0.0.

See:
http://guides.rubyonrails.org/4_2_release_notes.html#default-host-for-rails-server

Is this the best way of running the app in a VM? Perhaps it would be better to make it behave more like other apps.

cc @dsingleton

README.md Outdated
The application will start on port `3133`, so to access it visit [0.0.0.0:3113](http://0.0.0.0:3113/)
If running on a VM, then Rails needs to be bound to `0.0.0.0` rather than localhost so that it can be accessed outside of the VM:
```
PLEK_SERVICE_STATIC_URI=assets.digital.cabinet-office.gov.uk bundle exec rails s -b 0.0.0.0 -p 3113

This comment has been minimized.

@dsingleton

dsingleton Jan 11, 2016
Contributor

I don't think the hosting binding param is needed outside a GOV.UK VM, only for the VM case below.

@dsingleton
Copy link
Contributor

@dsingleton dsingleton commented Jan 11, 2016

Is this the best way of running the app in a VM? Perhaps it would be better to make it behave more like other apps.

I suspect that would require the component guide to be defined in Puppet as a proper application/service, which we don't want to do right now.

I think adding some doc, and possibly updating startup.sh to use the host binding param would work for now. In fact, referencing an updated startup.sh from the docs would probably be simpler than what we have now.

fofr and others added 3 commits Jan 7, 2016
Running `bundle exec rails s` binds to localhost, and this isn’t
accessible from outside of the machine. Instead bind to `0.0.0.0`.

See:
http://guides.rubyonrails.org/4_2_release_notes.html#default-host-for-ra
ils-server
The command in startup.sh will work on the VM and on a local machine,
and moving it there simplifies the README instructions quite a bit.

I've left/re-worded the note about needing to bind the host on a
VM, but only as an exceptional case.
@dsingleton dsingleton force-pushed the tweak-readme branch from b906529 to 1cfc5f5 Feb 26, 2016
@dsingleton
Copy link
Contributor

@dsingleton dsingleton commented Feb 26, 2016

I've added a commit to move the binding into startup.sh and hide some of the complexity in the common case.

Tested on the VM and locally.

dsingleton added a commit that referenced this pull request Mar 7, 2016
Add details about running guide on VM
@dsingleton dsingleton merged commit 9e8bb2a into master Mar 7, 2016
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@dsingleton dsingleton deleted the tweak-readme branch Mar 7, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.