From 64672dfdc894d26f1b1453a9dc6b153c58ad9d87 Mon Sep 17 00:00:00 2001
From: Adam French
Date: Tue, 18 Aug 2026 17:27:48 +0100
Subject: [PATCH] Speed up deploy times
---
.gitea/workflows/deploy.yaml | 1 +
.gitea/workflows/maintenance.yaml | 4 ++--
backend/Dockerfile | 19 ++++++++++++++++---
vue/Dockerfile | 7 +++++--
vue/src/views/CV/CVProgramming.vue | 12 ++++++------
5 files changed, 30 insertions(+), 13 deletions(-)
diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml
index d13c40b..95aace2 100644
--- a/.gitea/workflows/deploy.yaml
+++ b/.gitea/workflows/deploy.yaml
@@ -21,6 +21,7 @@ jobs:
working-directory: /home/adamf/deploy/web_server
env:
DOCKER_API_VERSION: "1.41"
+ COMPOSE_BAKE: "false"
run: docker compose up -d --build --remove-orphans
- name: Prune unused Docker resources
diff --git a/.gitea/workflows/maintenance.yaml b/.gitea/workflows/maintenance.yaml
index 18a89a4..8cf006b 100644
--- a/.gitea/workflows/maintenance.yaml
+++ b/.gitea/workflows/maintenance.yaml
@@ -36,8 +36,8 @@ jobs:
- name: Prune unused Docker images
run: docker image prune -af
- - name: Prune unused Docker build cache
- run: docker builder prune -af
+ - name: Prune old Docker build cache
+ run: docker builder prune -f --filter until=336h
- name: Show running containers
run: docker compose ps
diff --git a/backend/Dockerfile b/backend/Dockerfile
index ba75d07..84b4558 100644
--- a/backend/Dockerfile
+++ b/backend/Dockerfile
@@ -1,14 +1,27 @@
-FROM golang:1.25
+FROM golang:1.25 AS builder
WORKDIR /backend
COPY go.mod go.sum ./
-RUN go mod download
+RUN --mount=type=cache,target=/go/pkg/mod \
+ go mod download
COPY . ./
-RUN go build -o main .
+RUN --mount=type=cache,target=/go/pkg/mod \
+ --mount=type=cache,target=/root/.cache/go-build \
+ CGO_ENABLED=0 go build -o main .
+
+FROM debian:bookworm-slim
+
+RUN apt-get update \
+ && apt-get install --yes ca-certificates \
+ && rm -rf /var/lib/apt/lists/*
+
+WORKDIR /backend
+
+COPY --from=builder /backend/main ./main
EXPOSE 8080
diff --git a/vue/Dockerfile b/vue/Dockerfile
index 86e9e37..da30d11 100644
--- a/vue/Dockerfile
+++ b/vue/Dockerfile
@@ -4,14 +4,17 @@ RUN rustup target add wasm32-unknown-unknown \
&& cargo install wasm-pack
WORKDIR /wasm
COPY crates/stp_wasm/ crates/stp_wasm/
-RUN wasm-pack build crates/stp_wasm --target web --out-dir ../../src/wasm
+RUN --mount=type=cache,target=/usr/local/cargo/registry \
+ --mount=type=cache,target=/wasm/crates/stp_wasm/target \
+ wasm-pack build crates/stp_wasm --target web --out-dir ../../src/wasm
# Stage 2: Build Vue frontend
FROM node:22-slim
RUN apt-get update && apt-get install -y make git && rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY package.json package-lock.json ./
-RUN npm ci
+RUN --mount=type=cache,target=/root/.npm \
+ npm ci
COPY . .
COPY --from=wasm-builder /wasm/src/wasm/ src/wasm/
CMD ["sh", "-c", "npx vite build --outDir /output --emptyOutDir"]
diff --git a/vue/src/views/CV/CVProgramming.vue b/vue/src/views/CV/CVProgramming.vue
index 64c8468..f34f87e 100644
--- a/vue/src/views/CV/CVProgramming.vue
+++ b/vue/src/views/CV/CVProgramming.vue
@@ -31,9 +31,8 @@ import Project from "./Project.vue";
frontends to the self-hosted infrastructure they run on.
Dissertation proved
Mobile Automata are computationally
- equivalent to Turing
- Machines. Integrates AI tooling (Claude Code) into everyday
- development.
+ equivalent to Turing Machines. Integrates AI tooling (Claude
+ Code) into everyday development.
@@ -109,6 +108,7 @@ import Project from "./Project.vue";
Introduction to Rings and Fields with
Applications
+ Real Analysis
@@ -200,9 +200,9 @@ import Project from "./Project.vue";
Research project on
- Mobile Automata: data visualisation
- in Mathematica, presented to the Wolfram community.
- Groundwork for the dissertation above.
+ Mobile Automata: data
+ visualisation in Mathematica, presented to the Wolfram
+ community. Groundwork for the dissertation above.