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:
commit
712f71c7e5
8 changed files with 30 additions and 5 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
language: ruby
|
language: ruby
|
||||||
|
|
||||||
rvm:
|
rvm:
|
||||||
- 2.2.2
|
- 2.5
|
||||||
|
|
||||||
install: gem install jekyll jekyll-paginate jemoji html-proofer
|
install: gem install jekyll jekyll-paginate jemoji html-proofer
|
||||||
script: jekyll serve --baseurl "" --detach && htmlproofer ./_site --disable-external --empty-alt-ignore
|
script: jekyll serve --baseurl "" --detach && htmlproofer ./_site --disable-external --empty-alt-ignore
|
||||||
|
|
|
||||||
13
README.md
13
README.md
|
|
@ -67,6 +67,19 @@ To serve across lan (requires su to forward the port 4000 over lan):
|
||||||
./scripts/serve-lan-production
|
./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 }
|
## OSS used in { Personal }
|
||||||
|
|
||||||
One of the reasons { Personal } is real is the following OSS projects:
|
One of the reasons { Personal } is real is the following OSS projects:
|
||||||
|
|
|
||||||
1
_config.dev.yml
Normal file
1
_config.dev.yml
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
baseurl: ""
|
||||||
11
docker-compose.yml
Normal file
11
docker-compose.yml
Normal 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
|
||||||
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
#!/bin/bash
|
#!/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
2
scripts/serve-lan
Normal file → Executable file
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
sudo iptables -I INPUT -p tcp --dport 4000 -j ACCEPT
|
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
2
scripts/serve-lan-production
Normal file → Executable file
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
sudo iptables -I INPUT -p tcp --dport 4000 -j ACCEPT
|
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
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
#!/bin/bash
|
#!/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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue