File tree Expand file tree Collapse file tree 4 files changed +15
-8
lines changed
Expand file tree Collapse file tree 4 files changed +15
-8
lines changed Original file line number Diff line number Diff line change 1313 // Use 'forwardPorts' to make a list of ports inside the container available locally.
1414 "forwardPorts" : [
1515 5173 ,
16- 5432 // for postgres
16+ 5432 , // for postgres
17+ 6543 // for postgres
1718 ],
1819 // "shutdownAction": "none",
1920 //
Original file line number Diff line number Diff line change 9494 run : pnpm dlx prisma migrate deploy
9595 env :
9696 DATABASE_URL : ${{ secrets.PREVIEW_DATABASE_URL }}
97+ DIRECT_URL : ${{ secrets.PREVIEW_DIRECT_URL }}
9798
9899 - name : Pull Vercel Environment Information
99100 run : pnpm vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
@@ -140,6 +141,7 @@ jobs:
140141 run : pnpm dlx prisma migrate deploy
141142 env :
142143 DATABASE_URL : ${{ secrets.PRODUCTION_DATABASE_URL }}
144+ DIRECT_URL : ${{ secrets.PRODUCTION_DIRECT_URL }}
143145
144146 - name : Pull Vercel Environment Information
145147 run : pnpm vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
Original file line number Diff line number Diff line change @@ -2,14 +2,15 @@ services:
22 web :
33 build : .
44 ports :
5- - 5173:5173
5+ - ' 5173:5173'
66 tty : true
77 volumes :
88 - .:/usr/src/app:cached
99 - ./node_modules:/usr/src/app/node_modules:cached
1010 environment :
1111 - NODE_ENV=development
12- - DATABASE_URL=postgresql://db_user:db_password@db:5432/test_db
12+ - DATABASE_URL=postgresql://db_user:db_password@db:5432/test_db?pgbouncer=true&connection_limit=10&connect_timeout=60&statement_timeout=60000 # Note: Local server cannot start if port is set to db:6543.
13+ - DIRECT_URL=postgresql://db_user:db_password@db:5432/test_db
1314 command : sleep infinity
1415 depends_on :
1516 - db
@@ -25,7 +26,7 @@ services:
2526 POSTGRES_DB : test_db
2627 POSTGRES_INITDB_ARGS : ' --encoding=UTF8'
2728 ports :
28- - 5432 :5432
29+ - ' 6543 :5432'
2930
3031volumes :
3132 postgres-data :
Original file line number Diff line number Diff line change 33
44// See:
55// https://www.prisma.io/docs/concepts/components/prisma-schema/generators
6+ // https://www.prisma.io/docs/orm/prisma-client/deployment/edge/deploy-to-vercel
67generator client {
7- provider = " prisma-client-js "
8- binaryTargets = [" native " , " rhel-openssl-3.0.x " ]
8+ provider = " prisma-client-js "
9+ binaryTargets = [" native " , " rhel-openssl-3.0.x " ]
10+ previewFeatures = [" driverAdapters " ]
911}
1012
1113// See:
@@ -26,8 +28,9 @@ generator fabbrica {
2628}
2729
2830datasource db {
29- provider = " postgresql "
30- url = env (" DATABASE_URL " )
31+ provider = " postgresql "
32+ url = env (" DATABASE_URL " )
33+ directUrl = env (" DIRECT_URL " )
3134}
3235
3336// Note: Lucia v3 + v3 Prisma adaperでは、全てのフィールドがキャメルケースであることが要求されている。
You can’t perform that action at this time.
0 commit comments