From 492b4d3e978b5b0646e4b00a0a5b42323483ed54 Mon Sep 17 00:00:00 2001 From: vaibhav bisht <39329182+vaibhav135@users.noreply.github.com> Date: Fri, 12 May 2023 22:09:03 +0530 Subject: [PATCH] Refactor/readme.md (#8723) * Update README.md Removed - Heroku DB setup section (since it's no longer free). Added - Section for setting up local DB. - Some other minor details. * Minor grammer fixes --------- Co-authored-by: vaibhav bisht Co-authored-by: Keith Williams --- README.md | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 0766b12f99..f20957d3dd 100644 --- a/README.md +++ b/README.md @@ -166,34 +166,29 @@ echo 'NEXT_PUBLIC_DEBUG=1' >> .env ``` DATABASE_URL='postgresql://:@:' ``` -
- If you don't know how to configure the DATABASE_URL, then follow the steps here to create a quick DB using Heroku. + If you don't know how to configure the DATABASE_URL, then follow the steps here to create a quick local DB - 1. Create a free account with [Heroku](https://heroku.com). + 1. [Download](https://www.postgresql.org/download/) and install postgres in your local (if you don't have it already). - 2. Create a new app. - Create an App + 2. Create your own local db by executing `createDB ` - 3. In your new app, go to `Overview` and next to `Installed add-ons`, click `Configure Add-ons`. We need this to set up our database. - ![image](https://user-images.githubusercontent.com/16905768/115323232-a53ba480-a17f-11eb-98db-58e2f8c52426.png) + 3. Now open your psql shell with the DB you created: `psql -h localhost -U postgres -d ` - 4. Once you clicked on `Configure Add-ons`, click on `Find more add-ons` and search for `postgres`. One of the options will be `Heroku Postgres` - click on that option. - ![image](https://user-images.githubusercontent.com/16905768/115323126-5beb5500-a17f-11eb-8030-7380310807a9.png) + 4. Inside the psql shell execute `\conninfo`. And you will get the following info. + ![image](https://user-images.githubusercontent.com/39329182/236612291-51d87f69-6dc1-4a23-bf4d-1ca1754e0a35.png) - 5. Once the pop-up appears, click `Submit Order Form` - plan name should be `Hobby Dev - Free`. - Submit Order Form + 5. Now extract all the info and add it to your DATABASE_URL. The url would look something like this + `postgresql://postgres:postgres@localhost:5432/Your-DB-Name`. - 6. Once you completed the above steps, click on your newly created `Heroku Postgres` and go to its `Settings`. - ![image](https://user-images.githubusercontent.com/16905768/115323367-e92ea980-a17f-11eb-9ff4-dec95f2ec349.png) - - 7. In `Settings`, copy your URI to your Cal.com `.env` file and replace the `postgresql://:@:` with it. - ![image](https://user-images.githubusercontent.com/16905768/115323556-4591c900-a180-11eb-9808-2f55d2aa3995.png) - ![image](https://user-images.githubusercontent.com/16905768/115323697-7a9e1b80-a180-11eb-9f08-a742b1037f90.png) - - 8. To view your DB, once you add new data in Prisma, you can use [Heroku Data Explorer](https://heroku-data-explorer.herokuapp.com).
+ If you don't want to create a local DB. Then you can also consider using services like railway.app or render. + - [Setup postgres DB with railway.app](https://arctype.com/postgres/setup/railway-postgres) + - [Setup postgres DB with render](https://render.com/docs/databases) + +1. Copy and paste your `DATABASE_URL` from `.env` to `.env.appStore`. + 1. Set a 32 character random string in your `.env` file for the `CALENDSO_ENCRYPTION_KEY` (You can use a command like `openssl rand -base64 24` to generate one). 1. Set up the database using the Prisma schema (found in `packages/prisma/schema.prisma`)