mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-09 20:58:33 +00:00
Update Dockerfile
This commit is contained in:
parent
8daded50b2
commit
b9ee78ac7e
22
Dockerfile
22
Dockerfile
@ -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 Astro’s 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 Strudel’s 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"]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user