-
Notifications
You must be signed in to change notification settings - Fork 632
Setting sample config for container development #1992
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
base: master
Are you sure you want to change the base?
Changes from 3 commits
3abe8ff
f6f0b01
4fc1d7d
72962d0
66edc29
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,6 +70,34 @@ in your browser to access the preview. | |
|
||
**Note:** The build of the site will take several minutes. | ||
|
||
### Preview with Docker | ||
|
||
Run the following | ||
|
||
``` sh | ||
docker run -it --name ruby-lang -v $PWD:/www.ruby-lang.org -w /www.ruby-lang.org --network host ruby:2.6.1 sh -c "bundle install --without production && bundle exec rake serve" | ||
``` | ||
|
||
to generate the website and start a local web server | ||
|
||
|
||
Open [http://localhost:9292/](http://localhost:9292/) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can use |
||
in your browser to access the preview. | ||
|
||
### Preview with Docker Compose | ||
|
||
Run the following | ||
|
||
``` sh | ||
docker-compose up | ||
``` | ||
|
||
to generate the website and start a local web server | ||
|
||
|
||
Open [http://localhost:9292/](http://localhost:9292/) | ||
in your browser to access the preview. | ||
|
||
### Preview on Heroku | ||
|
||
In case a build is not possible on your local machine | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
version: '3.5' | ||
services: | ||
web: | ||
container_name: ruby-lang | ||
image: ruby:2.6.1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe this can be updated? It seems that 2.6.4 is available: https://hub.docker.com/_/ruby. Currently .travis.yml specified the version to 2.6.3. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @yous do I use the same version as travis or do I update Travis to use 2.6.4 as well? |
||
command: > | ||
sh -c "bundle check || bundle install --without production && | ||
bundle exec rake build && | ||
bundle exec rake serve" | ||
volumes: | ||
- .:/www.ruby-lang.org | ||
- bundle_cache:/usr/local/bundle | ||
working_dir: /www.ruby-lang.org | ||
ports: | ||
- 9292:9292 | ||
network_mode: host | ||
|
||
volumes: | ||
bundle_cache: | ||
name: ruby-lang-bundle |
Uh oh!
There was an error while loading. Please reload this page.