Skip to content

Commit 492b4d3

Browse files
vaibhav135vaibhav bishtkeithwillcode
authored
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 <vaibhav@aus.co.in> Co-authored-by: Keith Williams <keithwillcode@gmail.com>
1 parent 0ae319d commit 492b4d3

File tree

1 file changed

+13
-18
lines changed

1 file changed

+13
-18
lines changed

README.md

+13-18
Original file line numberDiff line numberDiff line change
@@ -166,33 +166,28 @@ echo 'NEXT_PUBLIC_DEBUG=1' >> .env
166166
```
167167
DATABASE_URL='postgresql://<user>:<pass>@<db-host>:<db-port>'
168168
```
169-
170169
<details>
171-
<summary>If you don't know how to configure the DATABASE_URL, then follow the steps here to create a quick DB using Heroku.</summary>
170+
<summary>If you don't know how to configure the DATABASE_URL, then follow the steps here to create a quick local DB</summary>
172171

173-
1. Create a free account with [Heroku](https://heroku.com).
172+
1. [Download](https://www.postgresql.org/download/) and install postgres in your local (if you don't have it already).
174173

175-
2. Create a new app.
176-
<img width="306" alt="Create an App" src="https://user-images.githubusercontent.com/16905768/115322780-b3d58c00-a17e-11eb-8a52-b758fb0ea942.png">
174+
2. Create your own local db by executing `createDB <DB name>`
177175

178-
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.
179-
![image](https://user-images.githubusercontent.com/16905768/115323232-a53ba480-a17f-11eb-98db-58e2f8c52426.png)
176+
3. Now open your psql shell with the DB you created: `psql -h localhost -U postgres -d <DB name>`
180177

181-
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.
182-
![image](https://user-images.githubusercontent.com/16905768/115323126-5beb5500-a17f-11eb-8030-7380310807a9.png)
178+
4. Inside the psql shell execute `\conninfo`. And you will get the following info.
179+
![image](https://user-images.githubusercontent.com/39329182/236612291-51d87f69-6dc1-4a23-bf4d-1ca1754e0a35.png)
183180

184-
5. Once the pop-up appears, click `Submit Order Form` - plan name should be `Hobby Dev - Free`.
185-
<img width="512" alt="Submit Order Form" src="https://user-images.githubusercontent.com/16905768/115323265-b4baed80-a17f-11eb-99f0-d67f019aa6df.png">
181+
5. Now extract all the info and add it to your DATABASE_URL. The url would look something like this
182+
`postgresql://postgres:postgres@localhost:5432/Your-DB-Name`.
186183

187-
6. Once you completed the above steps, click on your newly created `Heroku Postgres` and go to its `Settings`.
188-
![image](https://user-images.githubusercontent.com/16905768/115323367-e92ea980-a17f-11eb-9ff4-dec95f2ec349.png)
184+
</details>
189185

190-
7. In `Settings`, copy your URI to your Cal.com `.env` file and replace the `postgresql://<user>:<pass>@<db-host>:<db-port>` with it.
191-
![image](https://user-images.githubusercontent.com/16905768/115323556-4591c900-a180-11eb-9808-2f55d2aa3995.png)
192-
![image](https://user-images.githubusercontent.com/16905768/115323697-7a9e1b80-a180-11eb-9f08-a742b1037f90.png)
186+
If you don't want to create a local DB. Then you can also consider using services like railway.app or render.
187+
- [Setup postgres DB with railway.app](https://arctype.com/postgres/setup/railway-postgres)
188+
- [Setup postgres DB with render](https://render.com/docs/databases)
193189

194-
8. To view your DB, once you add new data in Prisma, you can use [Heroku Data Explorer](https://heroku-data-explorer.herokuapp.com).
195-
</details>
190+
1. Copy and paste your `DATABASE_URL` from `.env` to `.env.appStore`.
196191

197192
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).
198193
1. Set up the database using the Prisma schema (found in `packages/prisma/schema.prisma`)

0 commit comments

Comments
 (0)