Skip to content

Commit

Permalink
Update README.md with docs to help with bunny cdn
Browse files Browse the repository at this point in the history
  • Loading branch information
VineeTagarwaL-code authored Sep 16, 2024
1 parent d4791b4 commit e50eb5d
Showing 1 changed file with 48 additions and 10 deletions.
58 changes: 48 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Project Name: Job Board

[All about job board](https://marmalade-height-05f.notion.site/100xDevs-Job-board-ab8ca399180d49e4bc0c2ff5c81dfb08?pvs=25) <br/>
[Job board bugs](https://marmalade-height-05f.notion.site/100xDevs-JOB-BOARD-Bugs-10115651c69c80478fc8f673a139bc60)

## Table of Contents

- [Description](#description)
Expand Down Expand Up @@ -40,27 +38,25 @@ Follow these steps to set up the repository locally and run it.

```bash
#
# Database
# Database
#
DATABASE_URL="postgres://postgres:password@localhost:5432/postgres"

#
# AUTH
# AUTH
#
NEXTAUTH_SECRET="koXrQGB5TFD4KALDX4kAvnQ5RHHvAOIzB"
NEXTAUTH_URL="http://localhost:3000"

#
# Bunny CDN
#
CDN_API_KEY=api-key
CDN_BASE_UPLOAD_URL=https://sg.storage.bunnycdn.com/job-board/assets
CDN_BASE_ACCESS_URL=https://job-board.b-cdn.net/assets
CDN_SZ_NAME=
CDN_BASE_PATH=
CDN_API_KEY=
```

2. Change the hostname in `next.config.js` with your CDN access hostname by Ref of provided example.

3. To generate AUTH_SECRET,
2. To generate AUTH_SECRET,

Run this command in your terminal:

Expand All @@ -72,6 +68,7 @@ Follow these steps to set up the repository locally and run it.

[Run in browser](https://www.cryptool.org/en/cto/openssl/)


### Running the Project with Docker

```bash
Expand Down Expand Up @@ -106,3 +103,44 @@ Now, you can run the project and make changes as needed.
Emails: '[email protected], [email protected]';
Password: '123456';
```


## Steps to create a BunnyCDN storage for this repo:

1. **Create a storage zone:**

<img src="https://utfs.io/f/CUistsOk9f0Iocrllmq4RQuXkCx9NthDrTEw6dFy1Z3KfIPc" alt="Create a storage zone" width="150" />

2. **Connect the storage zone to a pull zone:**

<img src="https://utfs.io/f/CUistsOk9f0ImevkKUyo3QdPNXDuFbcZEagW0AUej1tzvmMw" alt="Connect the storage zone to a pull zone" width="250" />

4. **Set environment variables:**

Go to the FTP & API Access section in the storage zone and add the following environment variables:

```bash
CDN_API_KEY=<your-api-key>
```

Which you can find in the storage -> [storage name] -> FTP & API Access section

<img src="https://utfs.io/f/CUistsOk9f0Imf5c1ZUyo3QdPNXDuFbcZEagW0AUej1tzvmM" alt="CDN_API_KEY" width="500" />

---

```bash
CDN_BASE_UPLOAD_URL=<your-cdn-base-upload-url>
```
Which is https://[your-hostname]/[storage-name]/[any folder name you might have added otherwise empty]

<img src="https://utfs.io/f/CUistsOk9f0Imf5c1ZUyo3QdPNXDuFbcZEagW0AUej1tzvmM" alt="CDN_BASE_UPLOAD_URL" width="500" />

---

```bash
CDN_BASE_ACCESS_URL=<your-cdn-base-access-url>
```
Which is https://[your-pull-zone-hostname]/[any folder name you might have added otherwise empty]

<img src="https://utfs.io/f/CUistsOk9f0IyM9047Pa7YvK8qbtnUAPO9jwxdskhzc2JNoR" alt=" CDN_BASE_ACCESS_URL" width="600" />

0 comments on commit e50eb5d

Please sign in to comment.