Skip to content

Commit

Permalink
Create docker-entrypoint.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
poproar authored Jan 23, 2018
1 parent a4fc99f commit e6d902c
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash
set -e

#cd /site


if [ "$JEKYLL_NEW" = true ]; then
echo "NOTE: making new jekyll site!"
jekyll new .
fi

if [ ! -f Gemfile ]; then
echo "NOTE: hmm, I don't see a Gemfile so I don't think there's a jekyll site here"
echo "Either you didn't mount a volume, or you mounted it incorrectly."
echo "be sure you're in your jekyll site root and use something like this to launch"
echo ""
echo "docker run -p 80:4000 -v \$(pwd):/site bretfisher/jekyll-serve"
echo ""
echo "NOTE: To create a new site, add '-e JEKYLL_NEW=true' to the above command"
exit 1
fi

bundle install

exec "$@"

0 comments on commit e6d902c

Please sign in to comment.