Prepare Jekyll requirements
Signed-off-by: Benoit Donneaux <benoit@leastauthority.com>
This commit is contained in:
parent
45c5f5a6cb
commit
614d8b82f7
|
@ -0,0 +1,5 @@
|
||||||
|
/.gemrc
|
||||||
|
/_site
|
||||||
|
/.sass-cache
|
||||||
|
/src/.jekyll-metadata
|
||||||
|
/src/.jekyll-cache
|
|
@ -0,0 +1 @@
|
||||||
|
docker/jekyll/Gemfile.lock
|
|
@ -0,0 +1,29 @@
|
||||||
|
version: '3'
|
||||||
|
services:
|
||||||
|
jekyll:
|
||||||
|
build:
|
||||||
|
context: docker/jekyll
|
||||||
|
args:
|
||||||
|
uid: "${_UID:-1000}"
|
||||||
|
gid: "${_GID:-1000}"
|
||||||
|
volumes:
|
||||||
|
- .:/home/jekyll/workspace
|
||||||
|
working_dir: /home/jekyll/workspace
|
||||||
|
ports:
|
||||||
|
- "4000:4000"
|
||||||
|
stdin_open: true
|
||||||
|
tty: true
|
||||||
|
hostname: jekyll.local
|
||||||
|
container_name: jekyll.local
|
||||||
|
command: bash
|
||||||
|
networks:
|
||||||
|
- bridge
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpus: '1.5'
|
||||||
|
memory: 512M
|
||||||
|
|
||||||
|
networks:
|
||||||
|
bridge:
|
||||||
|
external: true
|
|
@ -0,0 +1,41 @@
|
||||||
|
# Pull base image from official repo
|
||||||
|
FROM rubylang/ruby:3.3.0-jammy
|
||||||
|
|
||||||
|
# Install some required packages for building Gems
|
||||||
|
RUN INSTALL_PKGS="gcc g++ libyaml-dev make nodejs" && \
|
||||||
|
apt-get -q clean && \
|
||||||
|
apt-get -q update && \
|
||||||
|
apt-get install -y $INSTALL_PKGS && \
|
||||||
|
apt-get -q clean
|
||||||
|
|
||||||
|
# Parameters for default user:group
|
||||||
|
ARG uid=1000
|
||||||
|
ARG user=ubuntu
|
||||||
|
ARG gid=1000
|
||||||
|
ARG group=ubuntu
|
||||||
|
|
||||||
|
# Add or modify user and group for build and runtime (convenient)
|
||||||
|
#RUN id ${user} > /dev/null 2>&1 && \
|
||||||
|
# { groupmod -g "${gid}" "${group}" && usermod -md /home/${user} -s /bin/bash -g "${group}" -u "${uid}" "${user}"; } || \
|
||||||
|
# { groupadd -g "${gid}" "${group}" && useradd -md /home/${user} -s /bin/bash -g "${group}" -u "${uid}" "${user}"; }
|
||||||
|
|
||||||
|
# Copy requirements in non-root user home directory
|
||||||
|
COPY Gemfile Gemfile.lock "/home/${user}/"
|
||||||
|
RUN chown "${user}:${group}" "/home/${user}/Gemfile"*
|
||||||
|
|
||||||
|
# Switch to non-root user
|
||||||
|
USER ${user}
|
||||||
|
WORKDIR /home/${user}
|
||||||
|
|
||||||
|
# Install required gems
|
||||||
|
RUN echo "gem: --no-document --user-install --bindir /home/${user}/bin" >> /home/${user}/.gemrc && \
|
||||||
|
echo "gempath: /home/${user}/.gem/ruby:/home/${user}/.bundle/gems/ruby/3.3.0" >> .gemrc && \
|
||||||
|
gem install bundler --version `sed -n -r -e '/BUNDLED WITH/,$ { s/\s+([.0-9]+)/\1/ p }' Gemfile.lock` && \
|
||||||
|
bundle config --global path /home/${user}/.bundle/gems && \
|
||||||
|
bundle config --global bin /home/${user}/bin && \
|
||||||
|
bundle install && \
|
||||||
|
rm -rf /home/${user}/.bundle/cache
|
||||||
|
|
||||||
|
ENV PATH=/home/${user}/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||||
|
|
||||||
|
CMD [ 'jekyll', 's', 'source', './src', '--verbose', '--host 0.0.0.0', '--incremental' ]
|
|
@ -0,0 +1,43 @@
|
||||||
|
source "https://rubygems.org"
|
||||||
|
|
||||||
|
# Hello! This is where you manage which Jekyll version is used to run.
|
||||||
|
# When you want to use a different version, change it below, save the
|
||||||
|
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
|
||||||
|
#
|
||||||
|
# bundle exec jekyll serve --live
|
||||||
|
#
|
||||||
|
# This will help ensure the proper Jekyll version is running.
|
||||||
|
# Happy Jekylling!
|
||||||
|
gem "jekyll", "~> 4.3.3"
|
||||||
|
|
||||||
|
# This is the default theme for new Jekyll sites. You may change this to anything you like.
|
||||||
|
# gem "minima", "2.0"
|
||||||
|
|
||||||
|
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
|
||||||
|
# uncomment the line below. To upgrade, run `bundle update github-pages`.
|
||||||
|
# gem "github-pages", group: :jekyll_plugins
|
||||||
|
|
||||||
|
# my custom gems
|
||||||
|
gem 'bootstrap', '~> 5.3.2'
|
||||||
|
gem "minima"
|
||||||
|
gem "minimal-mistakes-jekyll", '~> 4.25.0'
|
||||||
|
|
||||||
|
# The following plugins are automatically loaded by the theme-gem:
|
||||||
|
# gem "jekyll-paginate"
|
||||||
|
# gem "jekyll-sitemap"
|
||||||
|
# gem "jekyll-gist"
|
||||||
|
# gem "jekyll-feed"
|
||||||
|
# gem "jemoji"
|
||||||
|
# gem "jekyll-data"
|
||||||
|
# gem "jekyll-include-cache"
|
||||||
|
# If you have any plugins, put them here!
|
||||||
|
group :jekyll_plugins do
|
||||||
|
gem "jekyll-autoprefixer"
|
||||||
|
gem "jekyll-archives"
|
||||||
|
end
|
||||||
|
|
||||||
|
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
||||||
|
gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby]
|
||||||
|
|
||||||
|
# Performance-booster for watching directories on Windows
|
||||||
|
gem "wdm", "0.1.0" if Gem.win_platform?
|
|
@ -0,0 +1,125 @@
|
||||||
|
GEM
|
||||||
|
remote: https://rubygems.org/
|
||||||
|
specs:
|
||||||
|
addressable (2.8.6)
|
||||||
|
public_suffix (>= 2.0.2, < 6.0)
|
||||||
|
autoprefixer-rails (9.8.6.5)
|
||||||
|
execjs
|
||||||
|
bootstrap (5.3.2)
|
||||||
|
autoprefixer-rails (>= 9.1.0)
|
||||||
|
popper_js (>= 2.11.8, < 3)
|
||||||
|
colorator (1.1.0)
|
||||||
|
concurrent-ruby (1.2.3)
|
||||||
|
em-websocket (0.5.3)
|
||||||
|
eventmachine (>= 0.12.9)
|
||||||
|
http_parser.rb (~> 0)
|
||||||
|
eventmachine (1.2.7)
|
||||||
|
execjs (2.7.0)
|
||||||
|
faraday (2.9.0)
|
||||||
|
faraday-net_http (>= 2.0, < 3.2)
|
||||||
|
faraday-net_http (3.1.0)
|
||||||
|
net-http
|
||||||
|
ffi (1.16.3)
|
||||||
|
forwardable-extended (2.6.0)
|
||||||
|
google-protobuf (4.26.1)
|
||||||
|
rake (>= 13)
|
||||||
|
http_parser.rb (0.8.0)
|
||||||
|
i18n (1.14.4)
|
||||||
|
concurrent-ruby (~> 1.0)
|
||||||
|
jekyll (4.3.3)
|
||||||
|
addressable (~> 2.4)
|
||||||
|
colorator (~> 1.0)
|
||||||
|
em-websocket (~> 0.5)
|
||||||
|
i18n (~> 1.0)
|
||||||
|
jekyll-sass-converter (>= 2.0, < 4.0)
|
||||||
|
jekyll-watch (~> 2.0)
|
||||||
|
kramdown (~> 2.3, >= 2.3.1)
|
||||||
|
kramdown-parser-gfm (~> 1.0)
|
||||||
|
liquid (~> 4.0)
|
||||||
|
mercenary (>= 0.3.6, < 0.5)
|
||||||
|
pathutil (~> 0.9)
|
||||||
|
rouge (>= 3.0, < 5.0)
|
||||||
|
safe_yaml (~> 1.0)
|
||||||
|
terminal-table (>= 1.8, < 4.0)
|
||||||
|
webrick (~> 1.7)
|
||||||
|
jekyll-archives (2.2.1)
|
||||||
|
jekyll (>= 3.6, < 5.0)
|
||||||
|
jekyll-autoprefixer (1.0.2)
|
||||||
|
autoprefixer-rails (~> 9.3)
|
||||||
|
jekyll-feed (0.17.0)
|
||||||
|
jekyll (>= 3.7, < 5.0)
|
||||||
|
jekyll-gist (1.5.0)
|
||||||
|
octokit (~> 4.2)
|
||||||
|
jekyll-include-cache (0.2.1)
|
||||||
|
jekyll (>= 3.7, < 5.0)
|
||||||
|
jekyll-paginate (1.1.0)
|
||||||
|
jekyll-sass-converter (3.0.0)
|
||||||
|
sass-embedded (~> 1.54)
|
||||||
|
jekyll-seo-tag (2.8.0)
|
||||||
|
jekyll (>= 3.8, < 5.0)
|
||||||
|
jekyll-sitemap (1.4.0)
|
||||||
|
jekyll (>= 3.7, < 5.0)
|
||||||
|
jekyll-watch (2.2.1)
|
||||||
|
listen (~> 3.0)
|
||||||
|
kramdown (2.4.0)
|
||||||
|
rexml
|
||||||
|
kramdown-parser-gfm (1.1.0)
|
||||||
|
kramdown (~> 2.0)
|
||||||
|
liquid (4.0.4)
|
||||||
|
listen (3.9.0)
|
||||||
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
||||||
|
rb-inotify (~> 0.9, >= 0.9.10)
|
||||||
|
mercenary (0.4.0)
|
||||||
|
minima (2.5.1)
|
||||||
|
jekyll (>= 3.5, < 5.0)
|
||||||
|
jekyll-feed (~> 0.9)
|
||||||
|
jekyll-seo-tag (~> 2.1)
|
||||||
|
minimal-mistakes-jekyll (4.25.0)
|
||||||
|
jekyll (>= 3.7, < 5.0)
|
||||||
|
jekyll-feed (~> 0.1)
|
||||||
|
jekyll-gist (~> 1.5)
|
||||||
|
jekyll-include-cache (~> 0.1)
|
||||||
|
jekyll-paginate (~> 1.1)
|
||||||
|
jekyll-sitemap (~> 1.3)
|
||||||
|
net-http (0.4.1)
|
||||||
|
uri
|
||||||
|
octokit (4.25.1)
|
||||||
|
faraday (>= 1, < 3)
|
||||||
|
sawyer (~> 0.9)
|
||||||
|
pathutil (0.16.2)
|
||||||
|
forwardable-extended (~> 2.6)
|
||||||
|
popper_js (2.11.8)
|
||||||
|
public_suffix (5.0.5)
|
||||||
|
rake (13.2.1)
|
||||||
|
rb-fsevent (0.11.2)
|
||||||
|
rb-inotify (0.10.1)
|
||||||
|
ffi (~> 1.0)
|
||||||
|
rexml (3.2.6)
|
||||||
|
rouge (4.2.1)
|
||||||
|
safe_yaml (1.0.5)
|
||||||
|
sass-embedded (1.75.0)
|
||||||
|
google-protobuf (>= 3.25, < 5.0)
|
||||||
|
rake (>= 13.0.0)
|
||||||
|
sawyer (0.9.2)
|
||||||
|
addressable (>= 2.3.5)
|
||||||
|
faraday (>= 0.17.3, < 3)
|
||||||
|
terminal-table (3.0.2)
|
||||||
|
unicode-display_width (>= 1.1.1, < 3)
|
||||||
|
unicode-display_width (2.5.0)
|
||||||
|
uri (0.13.0)
|
||||||
|
webrick (1.8.1)
|
||||||
|
|
||||||
|
PLATFORMS
|
||||||
|
ruby
|
||||||
|
|
||||||
|
DEPENDENCIES
|
||||||
|
bootstrap (~> 5.3.2)
|
||||||
|
jekyll (~> 4.3.3)
|
||||||
|
jekyll-archives
|
||||||
|
jekyll-autoprefixer
|
||||||
|
minima
|
||||||
|
minimal-mistakes-jekyll (~> 4.25.0)
|
||||||
|
tzinfo-data
|
||||||
|
|
||||||
|
BUNDLED WITH
|
||||||
|
2.5.3
|
Loading…
Reference in New Issue