-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gh-pages: add Dockerfile for local dev/testing (#3201)
Signed-off-by: Mike Ralphson <[email protected]>
- Loading branch information
1 parent
003ee43
commit 1232ed6
Showing
7 changed files
with
163 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
_site/ | ||
deploy/ | ||
node_modules/ | ||
scripts/ | ||
package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Contributing | ||
|
||
## Building the site | ||
|
||
The registy site uses [jekyll](https://jekyllrb.com/), a Ruby based static site generator, with the Dinky theme. | ||
|
||
### Docker dev | ||
|
||
You can use the following Docker command to build and serve the site: | ||
|
||
```shell | ||
docker build . -t oas-spec/latest | ||
docker run -v $(pwd):/site -p 4000:4000 oas-spec/latest | ||
``` | ||
|
||
### Local Ruby dev | ||
|
||
You will need to set up Ruby locally to run the server and see your changes. | ||
|
||
``` bash | ||
gem install bundler | ||
bundle install | ||
``` | ||
|
||
With all the gems (dependencies) installed, you can launch the jekyll server. | ||
|
||
``` bash | ||
bundle exec jekyll serve | ||
``` | ||
|
||
It will show output like this, and you can grab the Server address and open it in your browser. | ||
|
||
``` | ||
Configuration file: /site/_config.yml | ||
Source: /site | ||
Destination: /site/_site | ||
Incremental build: disabled. Enable with --incremental | ||
Generating... | ||
done in 3.609 seconds. | ||
Auto-regeneration: enabled for '/site' | ||
Server address: http://0.0.0.0:4000 | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM bretfisher/jekyll-serve | ||
|
||
WORKDIR /site | ||
|
||
# install dependencies | ||
COPY Gemfile Gemfile.lock . | ||
RUN bundle install | ||
|
||
# install the site | ||
COPY . . | ||
|
||
EXPOSE 4000 | ||
CMD [ "bundle", "exec", "jekyll", "serve", "--host", "0.0.0.0" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# frozen_string_literal: true | ||
|
||
source "https://rubygems.org" | ||
|
||
gem "jekyll", "~> 4.2" | ||
gem "webrick", "~> 1.7" | ||
gem "jekyll-remote-theme" | ||
gem "jekyll-theme-dinky" | ||
|
||
group :jekyll_plugins do | ||
gem "jekyll-sitemap", "~> 1.4" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
addressable (2.8.1) | ||
public_suffix (>= 2.0.2, < 6.0) | ||
colorator (1.1.0) | ||
concurrent-ruby (1.2.2) | ||
em-websocket (0.5.3) | ||
eventmachine (>= 0.12.9) | ||
http_parser.rb (~> 0) | ||
eventmachine (1.2.7) | ||
ffi (1.15.5) | ||
forwardable-extended (2.6.0) | ||
google-protobuf (3.22.2-x86_64-linux) | ||
http_parser.rb (0.8.0) | ||
i18n (1.12.0) | ||
concurrent-ruby (~> 1.0) | ||
jekyll (4.3.2) | ||
addressable (~> 2.4) | ||
colorator (~> 1.0) | ||
em-websocket (~> 0.5) | ||
i18n (~> 1.0) | ||
jekyll-sass-converter (>= 2.0, < 4.0) | ||
jekyll-watch (~> 2.0) | ||
kramdown (~> 2.3, >= 2.3.1) | ||
kramdown-parser-gfm (~> 1.0) | ||
liquid (~> 4.0) | ||
mercenary (>= 0.3.6, < 0.5) | ||
pathutil (~> 0.9) | ||
rouge (>= 3.0, < 5.0) | ||
safe_yaml (~> 1.0) | ||
terminal-table (>= 1.8, < 4.0) | ||
webrick (~> 1.7) | ||
jekyll-remote-theme (0.4.3) | ||
addressable (~> 2.0) | ||
jekyll (>= 3.5, < 5.0) | ||
jekyll-sass-converter (>= 1.0, <= 3.0.0, != 2.0.0) | ||
rubyzip (>= 1.3.0, < 3.0) | ||
jekyll-sass-converter (3.0.0) | ||
sass-embedded (~> 1.54) | ||
jekyll-seo-tag (2.8.0) | ||
jekyll (>= 3.8, < 5.0) | ||
jekyll-sitemap (1.4.0) | ||
jekyll (>= 3.7, < 5.0) | ||
jekyll-theme-dinky (0.2.0) | ||
jekyll (> 3.5, < 5.0) | ||
jekyll-seo-tag (~> 2.0) | ||
jekyll-watch (2.2.1) | ||
listen (~> 3.0) | ||
kramdown (2.4.0) | ||
rexml | ||
kramdown-parser-gfm (1.1.0) | ||
kramdown (~> 2.0) | ||
liquid (4.0.4) | ||
listen (3.8.0) | ||
rb-fsevent (~> 0.10, >= 0.10.3) | ||
rb-inotify (~> 0.9, >= 0.9.10) | ||
mercenary (0.4.0) | ||
pathutil (0.16.2) | ||
forwardable-extended (~> 2.6) | ||
public_suffix (5.0.1) | ||
rb-fsevent (0.11.2) | ||
rb-inotify (0.10.1) | ||
ffi (~> 1.0) | ||
rexml (3.2.5) | ||
rouge (4.1.0) | ||
rubyzip (2.3.2) | ||
safe_yaml (1.0.5) | ||
sass-embedded (1.59.2-x86_64-linux-gnu) | ||
google-protobuf (~> 3.21) | ||
terminal-table (3.0.2) | ||
unicode-display_width (>= 1.1.1, < 3) | ||
unicode-display_width (2.4.2) | ||
webrick (1.8.1) | ||
|
||
PLATFORMS | ||
x86_64-linux | ||
|
||
DEPENDENCIES | ||
jekyll (~> 4.2) | ||
jekyll-remote-theme | ||
jekyll-sitemap (~> 1.4) | ||
jekyll-theme-dinky | ||
webrick (~> 1.7) | ||
|
||
BUNDLED WITH | ||
2.4.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters