Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
_site
.jekyll-cache
.jekyll-metadata
node_modules
vendor
.git
.github
tmp
9 changes: 8 additions & 1 deletion .github/workflows/jekyll.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,15 @@ jobs:
cache: 'npm'
- run: npm install

- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{steps.versions.outputs.ruby}}
bundler-cache: true

- name: Build
uses: jerryjvl/jekyll-build-action@v1
env:
JEKYLL_ENV: production
run: bundle exec jekyll build

- name: Tailscale
uses: tailscale/github-action@v2
Expand Down
15 changes: 11 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
# Contributing

This is a Jekyll site. Ruby is therefore required. `asdf` users can run `asdf install` and be on their way.
This is a Jekyll site. You can run it either with Docker (recommended — no local Ruby/Node setup) or directly on your machine.

The site is bundled with `bundler 2.0.x`. Ensure you have the correct major version: `bundle --version`.
## Development with Docker

## Development
Requires Docker with Compose.

The standard Jekyll commands apply.
- To start, run `docker compose up` (add `--build` after Gemfile or package.json changes)
- The website will be available at `http://localhost:4000/`
- Edit any file and the website should reload automatically
- Stop: `docker compose down`

## Development without Docker

Ruby and Node are required. `asdf` users can run `asdf install` and be on their way. The site is bundled with `bundler 2.3.x` — ensure you have the correct major version: `bundle --version`.

- Install dependencies: `bundle` and `npm install`.
- Run a development server: `bundle exec jekyll server`.
Expand Down
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM node:16-bullseye-slim AS node

FROM ruby:3.0.3-slim-bullseye

COPY --from=node /usr/local/bin/node /usr/local/bin/node
COPY --from=node /usr/local/bin/npm /usr/local/bin/npm
COPY --from=node /usr/local/lib/node_modules /usr/local/lib/node_modules

RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
git \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /app

COPY Gemfile Gemfile.lock ./
RUN bundle install

COPY package.json package-lock.json ./
RUN npm install

CMD ["bundle", "exec", "jekyll", "server", "--host", "0.0.0.0", "--force_polling", "--livereload"]
15 changes: 15 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
services:
jekyll:
build: .
ports:
- "4000:4000"
- "35729:35729"
volumes:
- .:/app
- bundle_cache:/usr/local/bundle
- node_modules_cache:/app/node_modules
stdin_open: true

volumes:
bundle_cache:
node_modules_cache: