Align backend dependencies
Build and deploy Docker image / build (push) Successful in 2m38s

This commit is contained in:
Ruslan Bakiev
2026-06-07 10:52:19 +07:00
parent 5d2721ff54
commit 53cbac1002
6 changed files with 1246 additions and 1084 deletions
+4 -2
View File
@@ -7,12 +7,13 @@ RUN npm ci
FROM deps AS builder FROM deps AS builder
COPY prisma.config.ts ./
COPY prisma ./prisma COPY prisma ./prisma
RUN npx prisma generate RUN KYC_DATABASE_URL=postgresql://postgres:postgres@localhost:5432/postgres npx prisma generate
COPY tsconfig.json ./ COPY tsconfig.json ./
COPY src ./src COPY src ./src
RUN npm run build RUN KYC_DATABASE_URL=postgresql://postgres:postgres@localhost:5432/postgres npm run build
FROM deps AS runtime-deps FROM deps AS runtime-deps
@@ -28,6 +29,7 @@ COPY --from=runtime-deps /app/node_modules ./node_modules
COPY --from=builder /app/node_modules/.prisma ./node_modules/.prisma COPY --from=builder /app/node_modules/.prisma ./node_modules/.prisma
COPY --from=builder /app/node_modules/@prisma/client ./node_modules/@prisma/client COPY --from=builder /app/node_modules/@prisma/client ./node_modules/@prisma/client
COPY --from=builder /app/dist ./dist COPY --from=builder /app/dist ./dist
COPY prisma.config.ts ./
COPY prisma ./prisma COPY prisma ./prisma
COPY scripts ./scripts COPY scripts ./scripts
+1209 -1071
View File
File diff suppressed because it is too large Load Diff
+12 -9
View File
@@ -11,19 +11,22 @@
}, },
"dependencies": { "dependencies": {
"@fastify/cors": "^11.2.0", "@fastify/cors": "^11.2.0",
"@prisma/client": "^6.5.0", "@prisma/adapter-pg": "^7.8.0",
"@sentry/node": "^9.5.0", "@prisma/client": "^7.8.0",
"@sentry/node": "^10.56.0",
"fastify": "^5.8.5", "fastify": "^5.8.5",
"graphql": "^16.10.0", "graphql": "^16.14.1",
"graphql-tag": "^2.12.6", "graphql-tag": "^2.12.6",
"jose": "^6.0.11", "jose": "^6.2.3",
"mercurius": "^16.9.0", "mercurius": "^16.9.0",
"mongodb": "^6.13.0" "mongodb": "^7.2.0",
"pg": "^8.21.0"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^22.13.0", "@types/node": "^25.9.2",
"prisma": "^6.5.0", "@types/pg": "^8.20.0",
"tsx": "^4.19.0", "prisma": "^7.8.0",
"typescript": "^5.7.0" "tsx": "^4.22.4",
"typescript": "^6.0.3"
} }
} }
+12
View File
@@ -0,0 +1,12 @@
import 'dotenv/config'
import { defineConfig, env } from 'prisma/config'
export default defineConfig({
schema: 'prisma/schema.prisma',
migrations: {
path: 'prisma/migrations',
},
datasource: {
url: env('KYC_DATABASE_URL'),
},
})
-1
View File
@@ -4,7 +4,6 @@ generator client {
datasource db { datasource db {
provider = "postgresql" provider = "postgresql"
url = env("KYC_DATABASE_URL")
} }
model KYCApplication { model KYCApplication {
+9 -1
View File
@@ -1,3 +1,11 @@
import { PrismaClient } from '@prisma/client' import { PrismaClient } from '@prisma/client'
import { PrismaPg } from '@prisma/adapter-pg'
export const prisma = new PrismaClient() const connectionString = process.env.KYC_DATABASE_URL
if (!connectionString) {
throw new Error('KYC_DATABASE_URL is required')
}
const adapter = new PrismaPg({ connectionString })
export const prisma = new PrismaClient({ adapter })