From 3abe8ff4fd98e597fb3deba7d20f9467b04f0328 Mon Sep 17 00:00:00 2001 From: Alax Alves Date: Tue, 5 Mar 2019 22:13:33 -0300 Subject: [PATCH 1/4] Adding sample compose config --- docker-compose.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000000..c9eddfd2d2 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.5' +services: + web: + container_name: ruby-lang + image: ruby:2.6.1 + environment: + - RAILS_ENV=development + 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 From f6f0b01da70ea7fc3457b5c04d65d7903cfefd02 Mon Sep 17 00:00:00 2001 From: Alax Alves Date: Tue, 5 Mar 2019 22:13:56 -0300 Subject: [PATCH 2/4] Updating README with docker setup --- README.md | 28 ++++++++++++++++++++++++++++ docker-compose.yml | 2 -- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0f2a8f26de..0d3ab28bc6 100644 --- a/README.md +++ b/README.md @@ -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/) +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 diff --git a/docker-compose.yml b/docker-compose.yml index c9eddfd2d2..c9a007f32d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,8 +3,6 @@ services: web: container_name: ruby-lang image: ruby:2.6.1 - environment: - - RAILS_ENV=development command: > sh -c "bundle check || bundle install --without production && bundle exec rake build && From 72962d072ee5623a6670516e7481319f7113b641 Mon Sep 17 00:00:00 2001 From: Alax Alves Date: Wed, 11 Sep 2019 13:45:37 -0300 Subject: [PATCH 3/4] Using correct version for Ruby --- README.md | 3 +-- docker-compose.yml | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0d3ab28bc6..36fa2520fd 100644 --- a/README.md +++ b/README.md @@ -81,8 +81,7 @@ docker run -it --name ruby-lang -v $PWD:/www.ruby-lang.org -w /www.ruby-lang.org to generate the website and start a local web server -Open [http://localhost:9292/](http://localhost:9292/) -in your browser to access the preview. +Open in your browser to access the preview. ### Preview with Docker Compose diff --git a/docker-compose.yml b/docker-compose.yml index c9a007f32d..0498232b1c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ version: '3.5' services: web: container_name: ruby-lang - image: ruby:2.6.1 + image: ruby:2.6.3 command: > sh -c "bundle check || bundle install --without production && bundle exec rake build && From 66edc29cd7c847d94cc14fc6b09ff42d0a4cbca8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lax=20de=20Carvalho=20Alves?= Date: Wed, 11 Sep 2019 14:16:26 -0300 Subject: [PATCH 4/4] Updating README.md with latest ruby version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: JĂșlio Campos --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 36fa2520fd..7f539b3ad9 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ in your browser to access the preview. 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" +docker run -it --name ruby-lang -v $PWD:/www.ruby-lang.org -w /www.ruby-lang.org --network host ruby:2.6.3 sh -c "bundle install --without production && bundle exec rake serve" ``` to generate the website and start a local web server