sorted out issue w/ binding to localhost and with caching gems outside of container

This commit is contained in:
rzen 2019-07-22 23:22:11 -04:00
parent 1874a8fb62
commit 4ffea55a70

View File

@ -6,17 +6,17 @@ services:
jekyll-serve:
container_name: jekyll-serve
image: jekyll/jekyll
# command: jekyll serve --future --draft --force_polling --livereload
command: bash -c "bundle install && jekyll serve --future --draft --force_polling --livereload"
# command: bash -c "bundle install && bundle exec jekyll serve --watch --incremental --future --draft --force_polling --livereload"
environment:
# 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
# network_mode: host
ports:
- 4000:4000
- 35729:35729
volumes:
- .:/srv/jekyll
- .bundle:/usr/local/bundle
# build and push to rubygems.org
@ -29,11 +29,13 @@ services:
require \"rubygems\"; \
spec = Gem::Specification::load(\"jekyll-theme-isabelline.gemspec\"); \
puts \"#{spec.version}\"'` \
&& gem push -v jekyll-theme-isabelline-$${GEM_VER}.gem \
&& rm jekyll-theme-isabelline-$${GEV_VER}.gem
&& gem push jekyll-theme-isabelline-$${GEM_VER}.gem \
&& rm jekyll-theme-isabelline-*.gem
"
volumes:
- .:/srv/jekyll
- .bundle:/usr/local/bundle
- ./.gem:/root/.gem
# helpers
@ -44,6 +46,7 @@ services:
environment:
JEKYLL_ENV: local
volumes:
- .bundle:/usr/local/bundle
- .:/srv/jekyll
gem:
@ -51,13 +54,14 @@ services:
image: jekyll/jekyll
entrypoint: gem
volumes:
- .bundle:/usr/local/bundle
- .:/srv/jekyll
- ./.gem:/root/.gem
bundle:
container_name: jekyll
image: jekyll/jekyll
entrypoint: bundle
volumes:
- .bundle:/usr/local/bundle
- .:/srv/jekyll
- ./.gem:/root/.gem