Something went wrong. Try again.
Monorepo for Tangled tangled.org
Something went wrong. Try again.
2.0 kB · 44 lines
123456789101112131415161718192021222324252627282930313233343536373839404142434445# syntax=docker/dockerfile:1# Build the tranquil-pds fork straight from its git branch.# debian-slim final stage (not distroless) so `wget` works for the healthcheck.
FROM scratch AS tranquilADD https://tangled.org/oppi.li/tranquil-pds.git#op/vynuyrksymxl /
FROM node:24-trixie-slim AS frontendRUN corepack enable && corepack prepare pnpm@latest --activateCOPY --from=tranquil frontend /app/frontendWORKDIR /app/frontendRUN pnpm install --frozen-lockfileRUN pnpm build
FROM rust:1.96-slim-trixie AS builderRUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates pkg-config libssl-dev mold clang protobuf-compiler \ && rm -rf /var/lib/apt/lists/*ENV RUSTFLAGS="-C linker=clang -C link-arg=-fuse-ld=mold"COPY --from=tranquil Cargo.toml Cargo.lock /app/COPY --from=tranquil .sqlx /app/.sqlxCOPY --from=tranquil crates /app/cratesCOPY --from=tranquil migrations /app/migrationsWORKDIR /app# Trust the mounted Compose CA while retaining certificate verification.# Tranquil's similarly named native-tls-roots feature disables verification# for metadata fetches; enable reqwest's actual native root support instead.RUN --mount=type=cache,target=/usr/local/cargo/registry \ --mount=type=cache,target=/usr/local/cargo/git \ --mount=type=cache,target=/app/target \ SQLX_OFFLINE=true cargo build --locked -p tranquil-server --features reqwest/rustls-tls-native-roots && cp /app/target/debug/tranquil-server /tranquil-server
FROM debian:trixie-slimRUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates wget \ && rm -rf /var/lib/apt/lists/*COPY --from=builder /tranquil-server /usr/local/bin/tranquil-pdsCOPY --from=frontend /app/frontend/dist /var/lib/tranquil-pds/frontendRUN mkdir -p /var/lib/tranquil-pds/blobs /var/lib/tranquil-pds/storeWORKDIR /var/lib/tranquil-pdsENV SERVER_HOST=[::]ENV SERVER_PORT=3000EXPOSE 3000ENTRYPOINT ["/usr/local/bin/tranquil-pds"]