added dist to docker

This commit is contained in:
2026-09-10 16:10:23 +03:30
parent d670921f74
commit 502d966bf4
59 changed files with 681 additions and 2 deletions
+16
View File
@@ -0,0 +1,16 @@
import { execSync } from 'node:child_process'
import { existsSync } from 'node:fs'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..')
process.chdir(root)
execSync('node scripts/write-docker-vite-env.mjs', { stdio: 'inherit' })
execSync('npm run build-only', { stdio: 'inherit' })
if (!existsSync(path.join(root, 'dist', 'index.html'))) {
throw new Error('dist/index.html ساخته نشد')
}
console.log('dist آماده است. commit و push کنید تا Dokploy بدون npm سرو کند.')