mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-11 05:38:34 +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
|
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++ \
|
RUN apk add --no-cache git python3 make g++ \
|
||||||
&& corepack enable \
|
&& corepack enable \
|
||||||
&& corepack prepare pnpm@latest --activate # pin if you prefer
|
&& corepack prepare pnpm@latest --activate # pin a version if you like
|
||||||
|
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# 1. install monorepo deps
|
# monorepo deps
|
||||||
RUN pnpm install --frozen-lockfile
|
RUN pnpm install --frozen-lockfile
|
||||||
|
|
||||||
# 2. generate docs once – JsDoc.jsx expects this file
|
# the website build expects ./doc.json
|
||||||
RUN pnpm run jsdoc-json # produces ./doc.json :contentReference[oaicite:0]{index=0}
|
RUN pnpm run jsdoc-json
|
||||||
|
|
||||||
# Expose Astro’s default dev port
|
# Astro dev port
|
||||||
EXPOSE 4321 # default per Astro docs :contentReference[oaicite:1]{index=1}
|
EXPOSE 4321
|
||||||
|
|
||||||
# 3. launch the dev server, listen on all interfaces
|
# launch Strudel’s dev server on 0.0.0.0 so Docker can publish it
|
||||||
CMD ["pnpm", "dev", "--", "--host", "0.0.0.0", "--port", "4321"]
|
CMD ["pnpm", "--filter", "./website", "run", "dev", "--", "--host", "0.0.0.0", "--port", "4321"]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user