FIx some for build

This commit is contained in:
mahmood
2026-09-10 23:10:52 +03:30
parent ec899defb9
commit 21760b3ca1
8 changed files with 1915 additions and 530 deletions
+4 -3
View File
@@ -8,15 +8,16 @@ WORKDIR /app
ENV NODE_ENV=production
RUN apk add --no-cache openssl libc6-compat python3 make g++
# CDN رسمی Alpine روی خیلی از سرورهای ایران TLS می‌خورد → میرور آروان
RUN sed -i 's|dl-cdn.alpinelinux.org|mirror.arvancloud.ir|g' /etc/apk/repositories \
&& apk add --no-cache openssl libc6-compat
COPY apps/api/release/package.json ./
COPY apps/api/release/prisma ./prisma
COPY apps/api/release/app.js ./
RUN npm install --omit=dev \
&& npx prisma generate \
&& apk del python3 make g++
&& npx prisma generate
RUN mkdir -p uploads
+1 -2
View File
@@ -1,6 +1,6 @@
/**
* باندل تک‌فایل برای Docker (release/app.js) بعد از nest build.
* Prisma و bcrypt به‌خاطر باینری native خارجی می‌مانند و در ایمیج نصب می‌شوند.
* فقط Prisma به‌خاطر باینری native خارجی می‌ماند و در ایمیج نصب می‌شود.
*/
module.exports = {
entryPoints: ['dist/src/main.js'],
@@ -15,7 +15,6 @@ module.exports = {
external: [
'@prisma/client',
'.prisma/client',
'bcrypt',
// optional Nest peers — نباید resolve اجباری شوند
'@nestjs/microservices',
'@nestjs/websockets',
+2 -2
View File
@@ -31,7 +31,7 @@
"@nestjs/swagger": "^7.3.1",
"@nestjs/throttler": "^5.1.2",
"@prisma/client": "^5.14.0",
"bcrypt": "^5.1.1",
"bcryptjs": "^2.4.3",
"bullmq": "^5.7.8",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.1",
@@ -49,7 +49,7 @@
"@nestjs/cli": "^10.3.2",
"@nestjs/schematics": "^10.1.1",
"@nestjs/testing": "^10.3.8",
"@types/bcrypt": "^5.0.2",
"@types/bcryptjs": "^2.4.6",
"@types/express": "^4.17.21",
"@types/jest": "^29.5.12",
"@types/multer": "^1.4.11",
+1835 -1
View File
File diff suppressed because it is too large Load Diff
-1
View File
@@ -4,7 +4,6 @@
"version": "1.0.0",
"dependencies": {
"@prisma/client": "5.22.0",
"bcrypt": "5.1.1",
"prisma": "5.22.0"
}
}
+1 -2
View File
@@ -30,14 +30,13 @@ async function main() {
const prismaDest = path.join(root, 'release', 'prisma');
cpSync(prismaSrc, prismaDest, { recursive: true });
// فقط native / runtimeهای خارجی باندل
// فقط native runtimeهای خارجی باندل (Prisma)
const releasePkg = {
name: 'lucky-wheel-api-release',
private: true,
version: '1.0.0',
dependencies: {
'@prisma/client': '5.22.0',
bcrypt: '5.1.1',
prisma: '5.22.0',
},
};
@@ -8,7 +8,7 @@ import {
import { ConfigService } from '@nestjs/config';
import { JwtService } from '@nestjs/jwt';
import { AdminRole, AdminStatus } from '@prisma/client';
import * as bcrypt from 'bcrypt';
import * as bcrypt from 'bcryptjs';
import { PrismaService } from '../../prisma/prisma.service';
import { AdminLoginDto } from './dto/admin-login.dto';
import { AdminRefreshDto } from './dto/admin-refresh.dto';
+71 -518
View File
File diff suppressed because it is too large Load Diff