Speed up deploy times
Deploy with Docker Compose / deploy (push) Successful in 5m30s

This commit is contained in:
2026-08-18 17:27:48 +01:00
parent 557f92b39a
commit 64672dfdc8
5 changed files with 30 additions and 13 deletions
+1
View File
@@ -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
+2 -2
View File
@@ -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
+16 -3
View File
@@ -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
+5 -2
View File
@@ -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"]
+6 -6
View File
@@ -31,9 +31,8 @@ import Project from "./Project.vue";
frontends to the self-hosted infrastructure they run on.
<a href="/pdf/dissertation.pdf">Dissertation</a> proved
<a href="/automata">Mobile Automata</a> 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.
</p>
</section>
@@ -109,6 +108,7 @@ import Project from "./Project.vue";
Introduction to Rings and Fields with
Applications
</li>
<li>Real Analysis</li>
</ul>
</div>
</div>
@@ -200,9 +200,9 @@ import Project from "./Project.vue";
</template>
<p contenteditable="true">
Research project on
<a href="/automata">Mobile Automata</a>: data visualisation
in Mathematica, presented to the Wolfram community.
Groundwork for the dissertation above.
<a href="/automata">Mobile Automata</a>: data
visualisation in Mathematica, presented to the Wolfram
community. Groundwork for the dissertation above.
</p>
</Project>
</section>