Fix Docker deployment inputs

Include all addon workspaces and vendored dependencies in image builds, and expose deploy time plus commit metadata on the home page.

Amp-Thread-ID: https://ampcode.com/threads/T-01a033d4-0e44-708e-af0e-6166283416ff
Co-authored-by: Heaust Azure <heaust.azure@gmail.com>
This commit is contained in:
Amp
2026-08-24 18:30:45 +00:00
co-authored by heaust
parent 6153223fd5
commit d71da85307
6 changed files with 61 additions and 5 deletions
+8 -3
View File
@@ -18,11 +18,11 @@ RUN toolchain="$(sed -n 's/^channel = "\([^"]*\)"/\1/p' rust-toolchain.toml)" \
COPY package.json package-lock.json ./
COPY core/package.json ./core/package.json
COPY addons/handles/package.json ./addons/handles/package.json
COPY addons ./addons
COPY vendor ./vendor
RUN --mount=type=cache,target=/root/.npm npm ci --include=dev
COPY core ./core
COPY addons/handles ./addons/handles
COPY server/build.mjs ./server/build.mjs
RUN --mount=type=cache,target=/src/target mkdir -p /out \
&& wasm-pack build core --target web --out-dir /out/pkg --release \
@@ -42,6 +42,9 @@ RUN --mount=type=cache,target=/go/pkg/mod \
FROM debian:bookworm-slim AS runtime
ARG YAWN_DEPLOYED_AT=""
ARG YAWN_DEPLOY_COMMIT_MESSAGE=""
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates curl \
&& rm -rf /var/lib/apt/lists/* \
@@ -58,7 +61,9 @@ COPY --from=package-builder --chown=yawn:yawn /src/node_modules/monaco-editor/mi
ENV PORT=5002 \
YAWN_ROOT=/app \
YAWN_PACKAGES=/app/packages \
YAWN_DATABASE=/data/yawn.db
YAWN_DATABASE=/data/yawn.db \
YAWN_DEPLOYED_AT="${YAWN_DEPLOYED_AT}" \
YAWN_DEPLOY_COMMIT_MESSAGE="${YAWN_DEPLOY_COMMIT_MESSAGE}"
USER yawn:yawn
VOLUME ["/data"]