mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-20 04:14:59 +00:00
working local build of gh pages
This commit is contained in:
parent
72493f0920
commit
46b953ebeb
3 changed files with 17 additions and 11 deletions
2
Gemfile
2
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
|
||||
|
|
|
@ -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"]
|
||||
|
|
|
@ -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 \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue