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