Merge pull request #232 from le4ker/feature/docker

- Added Docker run instruction
  - Added Docker Compose file for run
  - Fixed baseurl blank in jekyll command

Gems "jekyll jekyll-paginate jemoji html-proofer" are installed in the Docker jekyll/jekyll image.

Issue Fixed le4ker/personal-jekyll-theme#219
This commit is contained in:
Jorge Arias 2018-03-12 02:54:44 -03:00 committed by Jorge Arias
commit 712f71c7e5
8 changed files with 30 additions and 5 deletions

View file

@ -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

View file

@ -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:

1
_config.dev.yml Normal file
View file

@ -0,0 +1 @@
baseurl: ""

11
docker-compose.yml Normal file
View file

@ -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

View file

@ -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

2
scripts/serve-lan Normal file → Executable file
View file

@ -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

2
scripts/serve-lan-production Normal file → Executable file
View file

@ -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

View file

@ -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