This commit is contained in:
+4
-2
@@ -7,12 +7,13 @@ RUN npm ci
|
||||
|
||||
FROM deps AS builder
|
||||
|
||||
COPY prisma.config.ts ./
|
||||
COPY prisma ./prisma
|
||||
RUN npx prisma generate
|
||||
RUN ORDERS_DATABASE_URL=postgresql://postgres:postgres@localhost:5432/postgres npx prisma generate
|
||||
|
||||
COPY tsconfig.json ./
|
||||
COPY src ./src
|
||||
RUN npm run build
|
||||
RUN ORDERS_DATABASE_URL=postgresql://postgres:postgres@localhost:5432/postgres npm run build
|
||||
|
||||
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/client ./node_modules/@prisma/client
|
||||
COPY --from=builder /app/dist ./dist
|
||||
COPY prisma.config.ts ./
|
||||
COPY prisma ./prisma
|
||||
COPY scripts ./scripts
|
||||
|
||||
|
||||
Generated
+1179
-1044
File diff suppressed because it is too large
Load Diff
+12
-9
@@ -11,18 +11,21 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@fastify/cors": "^11.2.0",
|
||||
"@prisma/client": "^6.5.0",
|
||||
"@sentry/node": "^9.5.0",
|
||||
"@prisma/adapter-pg": "^7.8.0",
|
||||
"@prisma/client": "^7.8.0",
|
||||
"@sentry/node": "^10.56.0",
|
||||
"fastify": "^5.8.5",
|
||||
"graphql": "^16.10.0",
|
||||
"graphql": "^16.14.1",
|
||||
"graphql-tag": "^2.12.6",
|
||||
"jose": "^6.0.11",
|
||||
"mercurius": "^16.9.0"
|
||||
"jose": "^6.2.3",
|
||||
"mercurius": "^16.9.0",
|
||||
"pg": "^8.21.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.13.0",
|
||||
"prisma": "^6.5.0",
|
||||
"tsx": "^4.19.0",
|
||||
"typescript": "^5.7.0"
|
||||
"@types/node": "^25.9.2",
|
||||
"@types/pg": "^8.20.0",
|
||||
"prisma": "^7.8.0",
|
||||
"tsx": "^4.22.4",
|
||||
"typescript": "^6.0.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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('ORDERS_DATABASE_URL'),
|
||||
},
|
||||
})
|
||||
@@ -4,7 +4,6 @@ generator client {
|
||||
|
||||
datasource db {
|
||||
provider = "postgresql"
|
||||
url = env("ORDERS_DATABASE_URL")
|
||||
}
|
||||
|
||||
model TariffReference {
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
import { PrismaClient } from '@prisma/client'
|
||||
import { PrismaPg } from '@prisma/adapter-pg'
|
||||
|
||||
export const prisma = new PrismaClient()
|
||||
const connectionString = process.env.ORDERS_DATABASE_URL
|
||||
if (!connectionString) {
|
||||
throw new Error('ORDERS_DATABASE_URL is required')
|
||||
}
|
||||
|
||||
const adapter = new PrismaPg({ connectionString })
|
||||
|
||||
export const prisma = new PrismaClient({ adapter })
|
||||
|
||||
Reference in New Issue
Block a user