Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM ruby:4.0.1 AS base

RUN bundle config set frozen 'true' && \
bundle config set path '/vendor/bundle'

WORKDIR /usr/src/app

COPY Gemfile Gemfile.lock ./
RUN bundle install

COPY . .

FROM base AS build-step
RUN bundle exec jekyll build

FROM scratch AS build
COPY --from=build-step /usr/src/app/_site /

FROM base AS server
EXPOSE 4000
CMD bundle exec jekyll serve --host 0.0.0.0 --port 4000 --destination /tmp/_site
21 changes: 21 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.PHONY: all build serve clean
Comment thread
MattyTheHacker marked this conversation as resolved.

all: build

build: clean
docker buildx build . --target build --output type=local,dest=./_site

serve:
docker compose up --build

clean:
rm -rf _site

fmt:
npm run format:fix

lint:
npm run lint:fix

spellcheck:
npm run spellcheck:staged
9 changes: 9 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
services:
jekyll:
build:
context: .
target: server
volumes:
- "./:/usr/src/app"
ports:
- "4000:4000"