Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
57dcd2a
META Add modify date and clean-up title
dltj Jul 21, 2024
c90cae1
META Move posts and pages to content directory
dltj Jul 21, 2024
8e69f36
META quote title in YAML
dltj Jul 21, 2024
63bd9ad
META Fix categories and statuses in Markdown
dltj Jul 21, 2024
556da72
META .markdown → .md; .html → .markdown
dltj Jul 21, 2024
e514f59
META Fix titles and categories from WordPress
dltj Jul 21, 2024
3b9e55d
META Replace Jekyll source code highlighting
dltj Jul 22, 2024
0debaef
META Replace Jekyll robustlink include with macro
dltj Jul 23, 2024
3ab8d65
META Replace image markup
dltj Jul 27, 2024
3928e1a
META Robust link macro cleanup
dltj Jul 27, 2024
dc2ebef
META convert Jekyll figure tag
dltj Jul 27, 2024
c82abb6
META Convert Jekyll note tag
dltj Jul 27, 2024
1395809
META Convert Jekyll Thursday Threads header tag
dltj Jul 27, 2024
f738d86
META Convert TT Quote tags
dltj Jul 27, 2024
fee1617
META Swap WordPress code tags for Markdown
dltj Jul 28, 2024
44a8e2b
META Cleaning up markup
dltj Jul 28, 2024
3cb26c3
META Inter-site link replacement and general cleanup
dltj Jul 28, 2024
3ed6f21
META Getting myself out of raw encoding hell.
dltj Aug 11, 2024
b40eed3
META Fix named anchors
dltj Aug 11, 2024
5e91970
META Move wp-content/uploads → assets/images
dltj Aug 12, 2024
e66d629
META Manual WP blog markup cleaning
dltj Aug 12, 2024
c429e45
META Convert [caption]'d content
dltj Nov 9, 2024
a6014be
META Swap Thursday Threads boilerplate for macro
dltj Nov 9, 2024
df9809f
META Remove Jekyll content and rearrange root
dltj Nov 10, 2024
27c7a64
META Commit Pelican config
dltj Nov 10, 2024
d6251ef
META Root-level cleanup
dltj Nov 10, 2024
3db670b
Make a Docker container for pelican
dltj Nov 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 8 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
_site/
.sass-cache/
.jekyll-cache/
.jekyll-metadata
vendor/
.bundle/config
.pdm-python
webmentions-cache/*
__pycache__
.venv/
.vscode/
cache/
output/
src/
tests/
1 change: 0 additions & 1 deletion .ruby-version

This file was deleted.

93 changes: 37 additions & 56 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,71 +1,52 @@
# Ruby image to use, change with [--build-arg RUBY_VERSION="3.3.0"]
ARG RUBY_VERSION="3.3.0"
# Alpine image to use, change with [--build-arg ALPINE_VERSION="3.19"]
ARG ALPINE_VERSION="3.19"
# s3deploy version to use
ARG S3DEPLOY_VERSION="2.11.0"


FROM ruby:${RUBY_VERSION}-alpine${ALPINE_VERSION} AS dltj-jekyll-builder

# Install build dependencies
RUN set -eux; \
apk add --no-cache --virtual build-deps \
build-base \
zlib-dev \
git

# Install Bundler
RUN set -eux; gem install bundler

COPY Gemfile-docker ./Gemfile

ENV BUNDLE_HOME=/usr/local/bundle \
BUNDLE_APP_CONFIG=/usr/local/bundle \
BUNDLE_DISABLE_PLATFORM_WARNINGS=true \
BUNDLE_BIN=/usr/local/bundle/bin

# Install gems from `Gemfile` via Bundler
RUN set -eux; \
bundler install
# Use Python as the base image
FROM python:3.12.7-slim

# s3deploy version to use
ARG S3DEPLOY_VERSION="2.12.1"

FROM ruby:${RUBY_VERSION}-alpine${ALPINE_VERSION} AS dltj-jekyll-runner
# Repeat ARG here because [Docker is stupid](https://docs.docker.com/reference/dockerfile/#understand-how-arg-and-from-interact)
ARG S3DEPLOY_VERSION
# Set the working directory
WORKDIR /app

# `git` is needed by the last-modified-at plugin
# `nodejs` is needed by one of the gems
# `jemalloc` is the malloc replacement
RUN set -eux; \
apk add --no-cache --virtual runner-deps \
# Install necessary system dependencies and PDM
RUN apt-get update && apt-get install -y \
git \
nodejs \
jemalloc \
aws-cli \
curl \
jq
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
# Install PDM
&& curl -sSL https://raw.githubusercontent.com/pdm-project/pdm/main/install-pdm.py | python3 -

# Ensure /root/.local/bin is in PATH
ENV PATH="/root/.local/bin:$PATH"

# Get the `s3deploy` program
RUN set -eux; \
curl -s -S -L -f https://github.com/bep/s3deploy/releases/download/v${S3DEPLOY_VERSION}/s3deploy_${S3DEPLOY_VERSION}_linux-amd64.tar.gz -o /tmp/s3deploy.tar.gz; \
tar -xzf /tmp/s3deploy.tar.gz --directory /usr/local/bin s3deploy; \
rm /tmp/s3deploy.tar.gz

# Install jemalloc — see https://github.com/jemalloc/jemalloc/issues/1443#issuecomment-1895891270
RUN set -eux; \
apk add --no-cache patchelf; \
patchelf --add-needed libjemalloc.so.2 /usr/local/bin/ruby; \
apk del patchelf
# Copy the pyproject.toml and pdm.lock files
COPY pyproject.toml pdm.lock* util /app/

# Install the dependencies
RUN pdm install --prod --no-self

# Clone the specified Pelican source repository
RUN git clone https://github.com/dltj/pelican.git /app/pelican

# Clone the specified theme repository
RUN git clone https://github.com/dltj/pelican-hyde.git /app/pelican-themes/pelican-hyde

ENV RUBY_YJIT_ENABLE=1 \
MALLOC_CONF="background_thread:true,metadata_thp:auto,dirty_decay_ms:500,muzzy_decay_ms:5000,narenas:2"
# Install Pelican from the cloned source
RUN pip install /app/pelican

COPY --from=dltj-jekyll-builder /usr/local/bundle /usr/local/bundle
COPY --from=dltj-jekyll-builder /Gemfile* /
# Copy your Pelican configuration files to the container
COPY pelicanconf.py /app/pelicanconf.py
COPY publishconf.py /app/publishconf.py

# Clean up
WORKDIR /srv/jekyll
# Expose port 8000 for serving
EXPOSE 8000

EXPOSE 4000
ENTRYPOINT ["bundler", "exec", "jekyll"]
CMD ["--version"]
# Let's get into it!
ENTRYPOINT ["pdm", "run", "pelican"]
CMD ["--version"]
54 changes: 0 additions & 54 deletions Gemfile-docker

This file was deleted.

Loading