diff --git a/Gemfile b/Gemfile index 4bbe4a2ef..741dc8bba 100644 --- a/Gemfile +++ b/Gemfile @@ -3,3 +3,5 @@ gem 'jekyll' gem 'jekyll-theme-cayman' gem 'jekyll-redirect-from' gem 'jekyll-sitemap' +gem "webrick" +gem 'github-pages', group: :jekyll_plugins diff --git a/scripts/Dockerfile.jekyll b/scripts/Dockerfile.jekyll index 506f090b7..6f5c01087 100644 --- a/scripts/Dockerfile.jekyll +++ b/scripts/Dockerfile.jekyll @@ -1,20 +1,16 @@ # Use the official Jekyll image from Docker Hub -FROM jekyll/jekyll:latest +FROM bretfisher/jekyll-serve # Set the working directory -WORKDIR /srv/jekyll +WORKDIR /site # Copy the current directory contents into the container at /srv/jekyll -COPY . /srv/jekyll +COPY . /site # Install any needed packages specified in Gemfile -RUN bundle install +RUN bundle install --retry 5 --jobs 20 -# Expose port 4000 to the host -EXPOSE 4000 +ENTRYPOINT [ "docker-entrypoint.sh" ] -# Health check to ensure the server is running -HEALTHCHECK --interval=30s --timeout=10s --start-period=5s CMD curl -f http://localhost:4000 || exit 1 +CMD [ "bundle", "exec", "jekyll", "serve", "--force_polling", "-H", "0.0.0.0", "-P", "4000" ] -# Run Jekyll server -CMD ["jekyll", "serve", "--host", "0.0.0.0", "--port", "4000", "--verbose"] diff --git a/scripts/jekyll_run.sh b/scripts/jekyll_run.sh index d31ac0c65..f1b85cb7f 100755 --- a/scripts/jekyll_run.sh +++ b/scripts/jekyll_run.sh @@ -1,4 +1,12 @@ #!/bin/bash # Run the Docker container -docker run --rm --network="host" -v "$PWD:/srv/jekyll" -p 4000:4000 --entrypoint /bin/bash -it my-jekyll-site +docker run \ + --rm \ + -v "$PWD:/site" \ + -p 4000:4000 \ + my-jekyll-site + +# -e HISTFILE=/srv/jekyll/.bash_history \ +# --entrypoint /bin/bash \ +# -it \