Updated docker
This commit is contained in:
@@ -34,6 +34,21 @@ collection links point there. All product photography is self-hosted under
|
||||
```bash
|
||||
npm run dev # vite dev server (port 3000)
|
||||
npm run build # production build to dist/
|
||||
npm run start # serve the production build (vite preview)
|
||||
npm start # serve the production build (node server.mjs)
|
||||
npm run preview # serve the production build via vite preview
|
||||
npm run lint # eslint
|
||||
```
|
||||
|
||||
## Docker
|
||||
|
||||
```bash
|
||||
docker build -t mozimo-web .
|
||||
docker run -p 3000:3000 mozimo-web
|
||||
```
|
||||
|
||||
Three-stage build (`deps → builder → runner`) on pinned `node:24-trixie-slim`:
|
||||
dependencies install with `npm ci` and BuildKit cache mounts, the final image
|
||||
runs as the unprivileged `node` user, ships only production dependencies plus
|
||||
the build output and a small Node server (`server.mjs`: static assets with
|
||||
immutable caching + gzip, SSR fetch-handler fallback, graceful shutdown), and
|
||||
includes a `HEALTHCHECK`. `.dockerignore` keeps build context minimal.
|
||||
|
||||
Reference in New Issue
Block a user