feat: Reintroduces cache to docker file, adds css build step.
All checks were successful
CI / release (push) Successful in 5m55s

This commit is contained in:
2025-04-03 13:00:16 -04:00
parent b7db32b9c5
commit 4ceefed5c1
4 changed files with 27 additions and 5 deletions

1
.dockerignore Normal file
View File

@@ -0,0 +1 @@
node_modules

View File

@@ -1,16 +1,37 @@
# ==================================================
# Build Swift Image
# ==================================================
FROM swift:6.0-noble AS build
WORKDIR /build
# Install OS updates
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
&& apt-get -q update \
&& apt-get -q dist-upgrade -y
WORKDIR /build
# First just resolve dependencies.
COPY ./Package.* ./
RUN swift package resolve
RUN --mount=type=cache,target=/build/.build swift package resolve
# Copy entire repo into container
COPY . .
# Build the static site.
RUN swift run
RUN --mount=type=cache,target=/build/.build swift run
# ==================================================
# Build CSS Image
# ==================================================
FROM node:23-alpine AS css
WORKDIR /build
RUN npm install -g pnpm@latest-10
COPY . .
RUN pnpm install && pnpm run css-build
# ==================================================
# Run Image
@@ -20,6 +41,7 @@ FROM caddy:2.9.1-alpine
WORKDIR /app
COPY --from=build /build/deploy .
COPY --from=css /build/content/static/output.css ./deploy/static/output.css
EXPOSE 80

File diff suppressed because one or more lines are too long

View File

@@ -20,5 +20,4 @@ alias n := new-article
[group('dev')]
build:
@pnpm run css-build
@docker build --tag {{docker_image}}:{{docker_tag}} .