Update Dockerfile

This commit is contained in:
Elias Stepanik 2025-05-24 06:49:49 +02:00 committed by GitHub
parent 8daded50b2
commit b9ee78ac7e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,22 +1,22 @@
# Base image with Corepack → pnpm already included
# ---------- base ----------
FROM node:20-alpine
# Build-time tools needed by some native deps
# native build tools and pnpm shim
RUN apk add --no-cache git python3 make g++ \
&& corepack enable \
&& corepack prepare pnpm@latest --activate # pin if you prefer
&& corepack enable \
&& corepack prepare pnpm@latest --activate # pin a version if you like
WORKDIR /usr/src/app
COPY . .
# 1. install monorepo deps
# monorepo deps
RUN pnpm install --frozen-lockfile
# 2. generate docs once JsDoc.jsx expects this file
RUN pnpm run jsdoc-json # produces ./doc.json :contentReference[oaicite:0]{index=0}
# the website build expects ./doc.json
RUN pnpm run jsdoc-json
# Expose Astros default dev port
EXPOSE 4321 # default per Astro docs :contentReference[oaicite:1]{index=1}
# Astro dev port
EXPOSE 4321
# 3. launch the dev server, listen on all interfaces
CMD ["pnpm", "dev", "--", "--host", "0.0.0.0", "--port", "4321"]
# launch Strudels dev server on 0.0.0.0 so Docker can publish it
CMD ["pnpm", "--filter", "./website", "run", "dev", "--", "--host", "0.0.0.0", "--port", "4321"]