🔧 Use vercel config for app (#1412)

This commit is contained in:
Luke Vella 2024-10-24 20:02:14 +01:00 committed by GitHub
parent de8f4ae04d
commit 9bbd8e0790
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 10 additions and 7 deletions

View file

@ -61,6 +61,7 @@ jobs:
runs-on: ubuntu-latest
env:
DATABASE_URL: postgresql://postgres:postgres@localhost:5450/rallly
DIRECT_DATABASE_URL: postgresql://postgres:postgres@localhost:5450/rallly
CI: true
steps:
- uses: actions/checkout@v4

View file

@ -1,5 +1,5 @@
{
"installCommand": "yarn install",
"buildCommand": "cd ../.. && yarn prisma generate && yarn turbo build --filter=@rallly/landing...",
"buildCommand": "cd ../.. && yarn db:generate && yarn build:landing && yarn db:deploy",
"outputDirectory": ".next"
}

5
apps/web/vercel.json Normal file
View file

@ -0,0 +1,5 @@
{
"installCommand": "yarn install",
"buildCommand": "cd ../.. && yarn db:generate && yarn build:web && yarn db:deploy",
"outputDirectory": ".next"
}

View file

@ -8,6 +8,8 @@
"dev:landing": "dotenv -c development turbo dev --filter=@rallly/landing",
"start": "turbo run start --filter=@rallly/web",
"build": "dotenv -c -- turbo run build --filter=@rallly/web",
"build:web": "turbo run build --filter=@rallly/web",
"build:landing": "turbo run build --filter=@rallly/landing",
"build:test": "turbo build:test",
"docs:dev": "turbo dev --filter=@rallly/docs...",
"db:deploy": "prisma migrate deploy",

View file

@ -1,6 +1,7 @@
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
directUrl = env("DIRECT_DATABASE_URL")
relationMode = "prisma"
}

View file

@ -1,6 +0,0 @@
#!/bin/sh
set -e
yarn prisma generate
yarn build
# Deploy migration using direct database connection (no connection pool)
DATABASE_URL=$DIRECT_DATABASE_URL yarn db:deploy