fix: deployment setup to Heroku (#1834)
* fix: move app.json to root directory * fix: add heroku-postbuild script * chore: add description to env variables on app.json * fix: update postdeploy script on app.json * fix: add Procfile to override start script Co-authored-by: Peer Richelsen <peeroke@gmail.com>
This commit is contained in:
parent
b7ad073de9
commit
691235f874
5 changed files with 29 additions and 20 deletions
1
Procfile
Normal file
1
Procfile
Normal file
|
@ -0,0 +1 @@
|
|||
web: npx turbo run @calcom/web#start
|
26
app.json
Normal file
26
app.json
Normal file
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"name": "Cal.com",
|
||||
"description": "Open Source Scheduling",
|
||||
"repository": "https://github.com/calcom/cal.com",
|
||||
"logo": "https://cal.com/android-chrome-512x512.png",
|
||||
"keywords": ["react", "typescript", "node", "nextjs", "prisma", "postgres", "trpc"],
|
||||
"addons": [
|
||||
{
|
||||
"plan": "heroku-postgresql:hobby-dev"
|
||||
}
|
||||
],
|
||||
"env": {
|
||||
"BASE_URL": {
|
||||
"description": "Replace HEROKU_APP_NAME with the name given to your app",
|
||||
"value": "https://HEROKU_APP_NAME.herokuapp.com"
|
||||
},
|
||||
"CALENDSO_ENCRYPTION_KEY": {
|
||||
"description": "Application Key for symmetric encryption and decryption. Must be 32 bytes for AES256 encryption algorithm.",
|
||||
"value": "secret"
|
||||
},
|
||||
"JWT_SECRET": "secret"
|
||||
},
|
||||
"scripts": {
|
||||
"postdeploy": "cd apps/web && npx prisma migrate deploy"
|
||||
}
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"name": "Cal.com",
|
||||
"description": "Open Source Scheduling",
|
||||
"repository": "https://github.com/calcom/cal.com",
|
||||
"logo": "https://cal.com/android-chrome-512x512.png",
|
||||
"keywords": ["react", "typescript", "node", "nextjs", "prisma", "postgres", "trpc"],
|
||||
"addons": [
|
||||
{
|
||||
"plan": "heroku-postgresql:hobby-dev"
|
||||
}
|
||||
],
|
||||
"env": {
|
||||
"BASE_URL": "https://${HEROKU_APP_NAME}.herokuapp.com",
|
||||
"CALENDSO_ENCRYPTION_KEY": "32-random-string",
|
||||
"JWT_SECRET": "secret"
|
||||
},
|
||||
"scripts": {
|
||||
"postdeploy": "npx prisma migrate deploy"
|
||||
}
|
||||
}
|
|
@ -15,6 +15,7 @@
|
|||
"dev": "turbo run dev --parallel",
|
||||
"dx": "turbo run dx",
|
||||
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
|
||||
"heroku-postbuild": "turbo run @calcom/web#build",
|
||||
"lint": "turbo run lint",
|
||||
"prepare": "husky install",
|
||||
"start": "turbo run start",
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
],
|
||||
"outputs": [".next/**"]
|
||||
},
|
||||
"@calcom/web#start": {},
|
||||
"build": {
|
||||
"dependsOn": ["^build"],
|
||||
"outputs": ["dist/**", ".next/**"]
|
||||
|
|
Loading…
Reference in a new issue