jekyll-theme-isabelline/docker-compose.yaml
2019-07-22 23:35:52 -04:00

68 lines
1.6 KiB
YAML

version: '3'
services:
# serve
jekyll-serve:
container_name: jekyll-serve
image: jekyll/jekyll
# here's why we need --host 0.0.0.0
# https://superuser.com/questions/949428/whats-the-difference-between-127-0-0-1-and-0-0-0-0
command: bash -c "bundle update && bundle exec jekyll serve --host 0.0.0.0 --future --draft --force_polling --livereload"
environment:
JEKYLL_ENV: local
ports:
- 4000:4000
- 35729:35729
volumes:
- .:/srv/jekyll
- .bundle:/usr/local/bundle
# build and push to rubygems.org
gem-push:
container_name: jekyll-gem-push
image: jekyll/jekyll
command: >
bash -c "gem build -v jekyll-theme-isabelline.gemspec \
&& GEM_VER=`ruby -e '\
require \"rubygems\"; \
spec = Gem::Specification::load(\"jekyll-theme-isabelline.gemspec\"); \
puts \"#{spec.version}\"'` \
&& gem push jekyll-theme-isabelline-$${GEM_VER}.gem \
&& rm jekyll-theme-isabelline--*.gem
"
volumes:
- .:/srv/jekyll
- .bundle:/usr/local/bundle
- ./.gem:/root/.gem
# helpers
jekyll:
container_name: jekyll
image: jekyll/jekyll
entrypoint: jekyll
environment:
JEKYLL_ENV: local
volumes:
- .bundle:/usr/local/bundle
- .:/srv/jekyll
gem:
container_name: jekyll-gem
image: jekyll/jekyll
entrypoint: gem
volumes:
- .bundle:/usr/local/bundle
- .:/srv/jekyll
bundle:
container_name: jekyll
image: jekyll/jekyll
entrypoint: bundle
volumes:
- .bundle:/usr/local/bundle
- .:/srv/jekyll
- ./.gem:/root/.gem