Switch pnpm->npm to fix esbuild build-script approval (matches astroreal)
- pnpm 11 (brew/corepack) errors 'ERR_PNPM_IGNORED_BUILDS: esbuild ignored' even with onlyBuiltDependencies; npm ci handles esbuild cleanly - Moreminimore-astroreal uses npm ci + npm run build (proven on EasyPanel) - Add esbuild as direct dep, generate package-lock.json, remove pnpm files - Dockerfile: npm ci -> npm run build -> node server.js (port 4321) - Verified: npm ci + npm run build produce dist (40 pages) successfully
This commit is contained in:
15
Dockerfile
15
Dockerfile
@@ -1,8 +1,8 @@
|
|||||||
# ── มิตซูชัยพร — Astro + Express (static) ─────────────────────────
|
# ── มิตซูชัยพร — Astro + Express (static) ─────────────────────────
|
||||||
# Build: pnpm build (astro) → Runtime: node server.js (port 4321)
|
# Build: npm run build (astro) → Runtime: node server.js (port 4321)
|
||||||
#
|
#
|
||||||
# Mirrors moreminimore-astroreal deployment pattern that works on EasyPanel:
|
# Uses npm (like moreminimore-astroreal which deploys on EasyPanel).
|
||||||
# serve the static Astro build from a small Node/Express server (no nginx).
|
# esbuild builds cleanly with npm ci (no pnpm build-script approval issues).
|
||||||
#
|
#
|
||||||
# Env: PORT (default 4321), GA_ID, FORM_EMAIL, GMAP_LAT/LNG (see .env.example)
|
# Env: PORT (default 4321), GA_ID, FORM_EMAIL, GMAP_LAT/LNG (see .env.example)
|
||||||
|
|
||||||
@@ -10,16 +10,15 @@ FROM node:22-bookworm-slim
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# ── Dependencies (pnpm 11 to match lockfile) ─────────────────────
|
# ── Dependencies ──────────────────────────────────────────────────
|
||||||
COPY package.json pnpm-lock.yaml ./
|
COPY package.json package-lock.json ./
|
||||||
RUN corepack enable && corepack prepare pnpm@11 --activate \
|
RUN npm ci
|
||||||
&& pnpm install --frozen-lockfile
|
|
||||||
|
|
||||||
# ── Source + Build ───────────────────────────────────────────────
|
# ── Source + Build ───────────────────────────────────────────────
|
||||||
COPY astro.config.mjs tsconfig.json ./
|
COPY astro.config.mjs tsconfig.json ./
|
||||||
COPY src/ src/
|
COPY src/ src/
|
||||||
COPY public/ public/
|
COPY public/ public/
|
||||||
RUN pnpm build
|
RUN npm run build
|
||||||
|
|
||||||
# ── Runtime ──────────────────────────────────────────────────────
|
# ── Runtime ──────────────────────────────────────────────────────
|
||||||
COPY server.js ./
|
COPY server.js ./
|
||||||
|
|||||||
5160
package-lock.json
generated
Normal file
5160
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -15,6 +15,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"astro": "^7.1.6",
|
"astro": "^7.1.6",
|
||||||
"express": "^5.2.1"
|
"express": "^5.2.1",
|
||||||
|
"esbuild": "0.28.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
3210
pnpm-lock.yaml
generated
3210
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -1,3 +0,0 @@
|
|||||||
allowBuilds:
|
|
||||||
esbuild: true
|
|
||||||
sharp: true
|
|
||||||
Reference in New Issue
Block a user