Fix prod docker build: native modules and frontend devDeps
Per-package onlyBuiltDependencies so pnpm 10 actually compiles native modules (isolated-vm, argon2, sqlite3, sharp) — root workspace config isn't visible when compose mounts a single package into /app. Frontend container now installs with devDeps (so tsc/vite exist), prunes after build, and gains a `start` script that serves the build via vite preview on 0.0.0.0:3000. Drop obsolete compose `version` key.
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
version: '3'
|
||||
|
||||
networks:
|
||||
main:
|
||||
external: true
|
||||
@@ -48,8 +46,9 @@ services:
|
||||
- |
|
||||
npm i -g pnpm
|
||||
cd /app
|
||||
pnpm install --production
|
||||
pnpm install --frozen-lockfile
|
||||
sleep 10
|
||||
rm -f .env
|
||||
pnpm run build
|
||||
pnpm prune --prod
|
||||
pnpm run start
|
||||
|
||||
Reference in New Issue
Block a user