Skip to content

Commit

Permalink
Dockerize for writers
Browse files Browse the repository at this point in the history
  • Loading branch information
unabris committed Nov 6, 2017
1 parent 162e801 commit c745939
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 8 deletions.
25 changes: 25 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM ruby:2.4.2

RUN apt-get update \
&& apt-get install -y \
node \
python-pygments \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/

RUN gem install \
github-pages \
jekyll \
jekyll-redirect-from \
kramdown \
rdiscount \
rouge

EXPOSE 4000

WORKDIR /src

COPY build.sh .
COPY build_d.sh .

CMD jekyll serve
2 changes: 2 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ exclude:
- Jenkinsfile
- docker-compose.yml
- Rakefile
- build.sh
- Dockerfile

feed:
path: /blog/feed.xml
Expand Down
7 changes: 7 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh

bundle install

rake write

JEKYLL_ENV=development jekyll serve -w -I --config _config.yml,_config_write.yml --port 4000 --host 0.0.0.0
18 changes: 10 additions & 8 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
---
jekyll:
image: jekyll/jekyll:pages
command: jekyll serve
ports:
- 4000:4000
volumes:
- ".:/srv/jekyll"
version: '3'
services:
jekyll:
build: .
command: ./build.sh
ports:
- 4000:4000
- 35729:35729
volumes:
- .:/src

0 comments on commit c745939

Please sign in to comment.