Skip to content

Commit f6f0b01

Browse files
committed
Updating README with docker setup
1 parent 3abe8ff commit f6f0b01

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,34 @@ in your browser to access the preview.
7070

7171
**Note:** The build of the site will take several minutes.
7272

73+
### Preview with Docker
74+
75+
Run the following
76+
77+
``` sh
78+
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"
79+
```
80+
81+
to generate the website and start a local web server
82+
83+
84+
Open [http://localhost:9292/](http://localhost:9292/)
85+
in your browser to access the preview.
86+
87+
### Preview with Docker Compose
88+
89+
Run the following
90+
91+
``` sh
92+
docker-compose up
93+
```
94+
95+
to generate the website and start a local web server
96+
97+
98+
Open [http://localhost:9292/](http://localhost:9292/)
99+
in your browser to access the preview.
100+
73101
### Preview on Heroku
74102

75103
In case a build is not possible on your local machine

docker-compose.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ services:
33
web:
44
container_name: ruby-lang
55
image: ruby:2.6.1
6-
environment:
7-
- RAILS_ENV=development
86
command: >
97
sh -c "bundle check || bundle install --without production &&
108
bundle exec rake build &&

0 commit comments

Comments
 (0)