diff --git a/.travis.yml b/.travis.yml index fd4dd10..5c6fe5e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: ruby rvm: -- 2.2.2 +- 2.5 install: gem install jekyll jekyll-paginate jemoji html-proofer script: jekyll serve --baseurl "" --detach && htmlproofer ./_site --disable-external --empty-alt-ignore diff --git a/README.md b/README.md index 631e841..b2f488b 100755 --- a/README.md +++ b/README.md @@ -67,6 +67,19 @@ To serve across lan (requires su to forward the port 4000 over lan): ./scripts/serve-lan-production ``` +### Docker + +Run using Docker: + +``` +docker run --rm -it -p 4000:4000 -v "$PWD:/srv/jekyll" jekyll/jekyll jekyll serve --watch --host "0.0.0.0" --config _config.yml,_config.dev.yml +``` + +Run using Docker with Docker Compose: +``` +docker-compose up +``` + ## OSS used in { Personal } One of the reasons { Personal } is real is the following OSS projects: diff --git a/_config.dev.yml b/_config.dev.yml new file mode 100644 index 0000000..2b9cde5 --- /dev/null +++ b/_config.dev.yml @@ -0,0 +1 @@ +baseurl: "" diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..08eb477 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,11 @@ +version: "3" + +services: + jekyll: + image: jekyll/jekyll + ports: + - "4000:4000" + command: jekyll serve --watch --host "0.0.0.0" --config _config.yml,_config.dev.yml + volumes: + - .:/srv/jekyll + diff --git a/scripts/serve b/scripts/serve index ee51d3c..474e8a4 100755 --- a/scripts/serve +++ b/scripts/serve @@ -1,3 +1,3 @@ #!/bin/bash -jekyll serve --watch --host "127.0.0.1" --baseurl "" +jekyll serve --watch --host "127.0.0.1" --config _config.yml,_config.dev.yml diff --git a/scripts/serve-lan b/scripts/serve-lan old mode 100644 new mode 100755 index 1e872ac..75964c9 --- a/scripts/serve-lan +++ b/scripts/serve-lan @@ -1,4 +1,4 @@ #!/bin/bash sudo iptables -I INPUT -p tcp --dport 4000 -j ACCEPT -jekyll serve --watch --host "0.0.0.0" --baseurl "" +jekyll serve --watch --host "0.0.0.0" --config _config.yml,_config.dev.yml diff --git a/scripts/serve-lan-production b/scripts/serve-lan-production old mode 100644 new mode 100755 index ccbc119..66ae6cf --- a/scripts/serve-lan-production +++ b/scripts/serve-lan-production @@ -1,4 +1,4 @@ #!/bin/bash sudo iptables -I INPUT -p tcp --dport 4000 -j ACCEPT -JEKYLL_ENV=production jekyll serve --host "0.0.0.0" --baseurl "" +JEKYLL_ENV=production jekyll serve --host "0.0.0.0" --config _config.yml,_config.dev.yml diff --git a/scripts/serve-production b/scripts/serve-production index 5c4736b..691b5db 100755 --- a/scripts/serve-production +++ b/scripts/serve-production @@ -1,3 +1,3 @@ #!/bin/bash -JEKYLL_ENV=production jekyll serve --host "127.0.0.1" --baseurl "" +JEKYLL_ENV=production jekyll serve --host "127.0.0.1" --config _config.yml,_config.dev.yml