Skip to content

Commit 49a8311

Browse files
authored
Update installation-deployments.md
Deployed on Supabase and Fastly and Docs were written accordingly.
1 parent 48abf62 commit 49a8311

File tree

1 file changed

+48
-72
lines changed

1 file changed

+48
-72
lines changed

docs/installation-deployments.md

Lines changed: 48 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,8 @@ Check out the [API docs](https://portkey.ai/docs/welcome/make-your-first-request
2222
6. Deploy using [Docker Compose](#docker-compose)
2323
7. Deploy on [Replit](#replit)
2424
8. Deploy on [Zeabur](#zeabur)
25-
9. Deploy on [Vercel](#vercel)
25+
9. Deploy with [Supabase Functions](#supabase-functions)
2626
10. Deploy using [Fastly](#fastly)
27-
11. Deploy on [AWS Lambda](#aws-lambda)
28-
12. Deploy on [Lambda@edge](#lambda-edge)
29-
13. Deploy with [Supabase Functions](#supabase-functions)
3027

3128
---
3229

@@ -248,31 +245,37 @@ For more details, refer to [Docker Compose official](https://docs.docker.com/com
248245

249246
---
250247

251-
### Vercel
248+
### Supabase Functions
252249

253-
1. Clone the Repository
250+
1. Clone the Repository:
254251

255252
```sh
256253
git clone https://github.com/portkey-ai/gateway
257254
```
258255

259-
2. Set up a new project in Vercel by linking the repository.
260-
261-
3. Configure environment variables in Vercel's dashboard, matching those in the `deployment.yaml` file (e.g., `PORTKEY_PROVIDER`, `PORTKEY_PROVIDER_AUTH_TOKEN`).
262-
263-
4. Adjust the project to use Vercel’s serverless function framework if needed.
256+
2. Set up a Supabase Account and create a new project (in browser).
257+
3. Install the Supabase CLI, login using `supabase login
258+
` and Initialize, follow [guides](https://supabase.com/docs/guides/local-development)
259+
4. Write Your Supabase Function in:
260+
```sh
261+
supabase/functions/your-function-file/index.ts
262+
```
263+
5. Deploy the Function (for windows add `npx` in start):
264+
```sh
265+
supabase functions deploy your-function-file
266+
```
267+
6. Now, its ready to Test, Monitor and Manage Functions (Using url from supabase dashboard):
268+
- Similar to `https://your-project-id.supabase.co/functions/v1/your-function-file`
264269

265-
5. Deploy your application.
266-
267-
For more details, refer to [Vercel's documentation](https://vercel.com/docs/deployments/git/vercel-for-github).
270+
Refer to [Supabase's official documentation](https://supabase.com/docs) for more details.
268271

269272
<br>
270273

271274
---
272275

273276
### Fastly
274277

275-
1. Follow Fastly’s [Compute@Edge tutorial](https://www.fastly.com/documentation/guides/compute/).
278+
1. Create / login to your fastly account (in browser).
276279

277280
2. Clone the Gateway Repository:
278281

@@ -283,89 +286,62 @@ git clone https://github.com/portkey-ai/gateway
283286
3. Install Fastly’s CLI:
284287

285288
```sh
286-
npm install -g @fastly/cli
289+
npm install fastly-cli
287290
```
288291

289-
4. Create a new Fastly service and link it to your cloned Gateway repo.
290-
291-
5. Modify the `gateway` code to fit into Fastly's Compute@Edge runtime, considering its unique environment for handling edge requests.
292-
293-
6. Deploy the service using Fastly CLI:
294-
292+
4. Log in to Fastly:
295293
```sh
296-
fastly compute publish
294+
fastly login
297295
```
298296

299-
For more details, refer to [Fastly’s official](https://www.fastly.com/).
300-
301-
<br>
302-
303-
---
304-
305-
### AWS Lambda
306-
307-
1. Clone the Repository:
297+
5. Create a New Fastly Service:
308298
```sh
309-
git clone https://github.com/portkey-ai/gateway
299+
fastly compute init
310300
```
311301

312-
2. Create a new AWS Lambda function via the AWS Management Console.
313-
314-
3. Use AWS Lambda Layers to include the necessary Node.js/Bun dependencies (e.g., `npm`).
315-
316-
4. Zip the Gateway project (excluding `node_modules`) and upload it to your Lambda function.
317-
318-
5. Configure environment variables for your Lambda function.
319-
320-
6. Set up an API Gateway for HTTP requests and route them to your Lambda function.
321-
322-
For more detailed steps, refer to the AWS Lambda [deployment documentation](https://docs.aws.amazon.com/lambda/).
302+
6. Write Your Edge Function Code in `src/main.rs` or `src/index.js`
323303

324-
<br>
325-
326-
---
327-
328-
### Lambda edge
329-
330-
1. Clone the Repository:
331-
304+
7. Set up the token locally (token is located on `Account > User(left bottom most) > API Token`)
332305
```sh
333-
git clone https://github.com/portkey-ai/gateway
306+
fastly profile create
334307
```
308+
Then follow the steps there to add token.
335309

336-
2. Prepare the project for Lambda@Edge deployment by ensuring that request handling works within CloudFront constraints.
310+
8. Deploy to Fastly
311+
```sh
312+
fastly compute publish
313+
```
314+
9. Now, its ready to Test, Monitor and Manage Functions (Using url from fastly dashboard):
315+
- Similar to `your-new-project.edgecompute.app`
316+
317+
For more details, refer to [Fastly’s official](https://www.fastly.com/products/edge-compute).
337318

338-
3. Set up an AWS CloudFront distribution.
319+
<br>
339320

340-
4. Deploy the Lambda function to the edge using the `aws` CLI or AWS Console.
321+
---
341322

342-
5. Attach the Lambda@Edge function to the CloudFront distribution.
323+
### Vercel
343324

344-
More information is available in AWS’s official [Lambda@Edge documentation](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-at-the-edge.html).
325+
- Docs to be written, please help!
326+
- Make sure you've deployed and tested the same.
345327

346328
<br>
347329

348330
---
349331

350-
### Supabase Functions
351-
352-
1. Clone the Repository:
353-
354-
```sh
355-
git clone https://github.com/portkey-ai/gateway
356-
```
332+
### AWS Lambda
357333

358-
2. Set up a Supabase project and create a new function.
334+
- Docs to be written, please help!
335+
- Make sure you've deployed and tested the same.
359336

360-
3. Modify the project to use Supabase’s environment.
337+
<br>
361338

362-
4. Deploy using the Supabase CLI:
339+
---
363340

364-
```sh
365-
supabase functions deploy your-function-name
366-
```
341+
### Lambda edge
367342

368-
Refer to [Supabase's official documentation](https://supabase.com/docs) for more details.
343+
- Docs to be written, please help!
344+
- Make sure you've deployed and tested the same.
369345

370346
<br>
371347

0 commit comments

Comments
 (0)