# starfleet-ui as a container image, for Render (docs/deployment.md): # # scripts/publish-image.sh TAG [--push] # # Two stages: the app is built with the dev dependencies, then the runtime # image gets the build output and the production dependencies only — the # server bundle imports three and @threlte/* at run time, so they ship. # # Tags and digests: bump each pair together, and keep the Bun version the # one the workflow's setup-bun installs. FROM docker.io/oven/bun:1.4.0@sha256:5ff609364c049b54eb0ff560ec96319729a972078ef2c755d758f0c6ef89c2d6 AS build WORKDIR /app COPY package.json bun.lock ./ RUN bun install --frozen-lockfile COPY . . RUN bun run build FROM docker.io/oven/bun:1.4.0-slim@sha256:e0ee68d16ccb9927bf02aa7dd8fd4bf3369ee6d46da04faa72b05ce8bfd135f6 WORKDIR /app ENV NODE_ENV=production COPY package.json bun.lock ./ # --ignore-scripts: `prepare` runs svelte-kit, a dev dependency. RUN bun install --frozen-lockfile --production --ignore-scripts COPY --from=build /app/build ./build # The adapter listens on 127.0.0.1 by default, which nothing outside the # container reaches. Render sets PORT itself; 3000 is for running it locally. ENV HOST=0.0.0.0 ENV PORT=3000 # Stamped by publish-image.sh; /healthz answers it. ENV STARFLEET_UI_VERSION=dev EXPOSE 3000 USER bun CMD ["bun", "build/index.js"]