From af07332313bf0b5f3957dcddd643889227341a77 Mon Sep 17 00:00:00 2001 From: dawn Date: Tue, 22 Sep 2026 21:01:51 +0300 Subject: [PATCH] localinfra: sites image tool cache, drop stale publishes Signed-off-by: dawn --- docker-compose.yml | 12 +++++++----- localinfra/sites.Dockerfile | 10 ++++++---- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index cd1769214..2e00d1045 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -931,18 +931,20 @@ services: SITESD_ISSUER: did:key:zDnaeg9UkMwsCRgMWXhSc6cn2VUfBLoypo3sRx4GovnUUA6e8 SITESD_PRIVATE_KEY: 708539e1ad16e9f26329b470f51d328de0977982e8d63da6238c76f134224e68 SITESD_KNOTS: knot.tngl.boltless.dev,knot2.tngl.boltless.dev + # knot feed cursor persistence + SITESD_REDIS: redis:6379 CLOUDFLARE_ACCOUNT_ID: ${TANGLED_CLOUDFLARE_ACCOUNT_ID:-} CLOUDFLARE_R2_ACCESS_KEY_ID: ${TANGLED_CLOUDFLARE_R2_ACCESS_KEY_ID:-} CLOUDFLARE_R2_SECRET_ACCESS_KEY: ${TANGLED_CLOUDFLARE_R2_SECRET_ACCESS_KEY:-} CLOUDFLARE_R2_BUCKET: ${TANGLED_CLOUDFLARE_R2_BUCKET:-tangled-sites} - extra_hosts: - - "host.docker.internal:host-gateway" - - "knot.tngl.boltless.dev:host-gateway" - - "knot2.tngl.boltless.dev:host-gateway" + # in-flight deploys drain past SIGTERM + stop_grace_period: 90s ports: - "8080:8080" - - "127.0.0.1:8086:8081" networks: [tngl] + depends_on: + redis: + condition: service_started sites: build: diff --git a/localinfra/sites.Dockerfile b/localinfra/sites.Dockerfile index 28e349969..92dd78c24 100644 --- a/localinfra/sites.Dockerfile +++ b/localinfra/sites.Dockerfile @@ -1,18 +1,20 @@ # Dev image for the sites Worker, built so a clean checkout boots the # `sites-worker` compose profile (sites/build/ is gitignored). +# rust-toolchain.toml is not copied: this tag carries the toolchain FROM rust:1.96.0-slim-trixie AS build -# worker-build compiles ureq's ring backend, which needs a C compiler +# build-essential for ring, ca-certificates for cargo RUN apt-get update \ && apt-get install -y --no-install-recommends build-essential ca-certificates \ && rm -rf /var/lib/apt/lists/* WORKDIR /src COPY sites/Cargo.toml sites/Cargo.lock ./ -COPY sites/src ./src +# manifest-only layer: src edits reuse it RUN rustup target add wasm32-unknown-unknown \ - && cargo install worker-build --version 0.7.4 --locked \ - && worker-build --release + && cargo install worker-build --version 0.7.4 --locked +COPY sites/src ./src +RUN worker-build --release RUN mkdir -p /out && cp -r build /out/build FROM node:24-slim AS runtime -- 2.51.2