starfleet-ui
Clone avec HTTPS, un jeton personnel en mot de passe, ou avec SSH, une clé ajoutée dans vos paramètres.
Dernier runRéussi#6 · main · 2 min 01 s
0Étoiles
0Forks
0Issues
| 1 | # starfleet-ui as a container image, for Render (docs/deployment.md): |
| 2 | # |
| 3 | # scripts/publish-image.sh TAG [--push] |
| 4 | # |
| 5 | # Two stages: the app is built with the dev dependencies, then the runtime |
| 6 | # image gets the build output and the production dependencies only — the |
| 7 | # server bundle imports three and @threlte/* at run time, so they ship. |
| 8 | # |
| 9 | # Tags and digests: bump each pair together, and keep the Bun version the |
| 10 | # one the workflow's setup-bun installs. |
| 11 | |
| 12 | FROM docker.io/oven/bun:1.4.0@sha256:5ff609364c049b54eb0ff560ec96319729a972078ef2c755d758f0c6ef89c2d6 AS build |
| 13 | WORKDIR /app |
| 14 | COPY package.json bun.lock ./ |
| 15 | RUN bun install --frozen-lockfile |
| 16 | COPY . . |
| 17 | RUN bun run build |
| 18 | |
| 19 | FROM docker.io/oven/bun:1.4.0-slim@sha256:e0ee68d16ccb9927bf02aa7dd8fd4bf3369ee6d46da04faa72b05ce8bfd135f6 |
| 20 | WORKDIR /app |
| 21 | ENV NODE_ENV=production |
| 22 | COPY package.json bun.lock ./ |
| 23 | # --ignore-scripts: `prepare` runs svelte-kit, a dev dependency. |
| 24 | RUN bun install --frozen-lockfile --production --ignore-scripts |
| 25 | COPY --from=build /app/build ./build |
| 26 | # The adapter listens on 127.0.0.1 by default, which nothing outside the |
| 27 | # container reaches. Render sets PORT itself; 3000 is for running it locally. |
| 28 | ENV HOST=0.0.0.0 |
| 29 | ENV PORT=3000 |
| 30 | # Stamped by publish-image.sh; /healthz answers it. |
| 31 | ENV STARFLEET_UI_VERSION=dev |
| 32 | EXPOSE 3000 |
| 33 | USER bun |
| 34 | CMD ["bun", "build/index.js"] |