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:
2026-04-23 21:52:22 +04:00
parent b481531301
commit 39460df61d
3 changed files with 16 additions and 3 deletions

View File

@@ -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