Skip to content

Commit

Permalink
fix: deployment setup to Heroku (calcom#1834)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
arthurdenner and PeerRich authored Feb 14, 2022
1 parent b7ad073 commit 691235f
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 20 deletions.
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: npx turbo run @calcom/web#start
26 changes: 26 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
20 changes: 0 additions & 20 deletions apps/web/app.json

This file was deleted.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
],
"outputs": [".next/**"]
},
"@calcom/web#start": {},
"build": {
"dependsOn": ["^build"],
"outputs": ["dist/**", ".next/**"]
Expand Down

0 comments on commit 691235f

Please sign in to comment.