You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/installation-deployments.md
+48-72Lines changed: 48 additions & 72 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,11 +22,8 @@ Check out the [API docs](https://portkey.ai/docs/welcome/make-your-first-request
22
22
6. Deploy using [Docker Compose](#docker-compose)
23
23
7. Deploy on [Replit](#replit)
24
24
8. Deploy on [Zeabur](#zeabur)
25
-
9. Deploy on [Vercel](#vercel)
25
+
9. Deploy with [Supabase Functions](#supabase-functions)
26
26
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)
30
27
31
28
---
32
29
@@ -248,31 +245,37 @@ For more details, refer to [Docker Compose official](https://docs.docker.com/com
248
245
249
246
---
250
247
251
-
### Vercel
248
+
### Supabase Functions
252
249
253
-
1. Clone the Repository
250
+
1. Clone the Repository:
254
251
255
252
```sh
256
253
git clone https://github.com/portkey-ai/gateway
257
254
```
258
255
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`
264
269
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.
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:
295
293
```sh
296
-
fastly compute publish
294
+
fastly login
297
295
```
298
296
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:
308
298
```sh
309
-
git clone https://github.com/portkey-ai/gateway
299
+
fastly compute init
310
300
```
311
301
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`
323
303
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`)
332
305
```sh
333
-
git clone https://github.com/portkey-ai/gateway
306
+
fastly profile create
334
307
```
308
+
Then follow the steps there to add token.
335
309
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).
337
318
338
-
3. Set up an AWS CloudFront distribution.
319
+
<br>
339
320
340
-
4. Deploy the Lambda function to the edge using the `aws` CLI or AWS Console.
321
+
---
341
322
342
-
5. Attach the Lambda@Edge function to the CloudFront distribution.
323
+
### Vercel
343
324
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.
345
327
346
328
<br>
347
329
348
330
---
349
331
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
357
333
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.
359
336
360
-
3. Modify the project to use Supabase’s environment.
337
+
<br>
361
338
362
-
4. Deploy using the Supabase CLI:
339
+
---
363
340
364
-
```sh
365
-
supabase functions deploy your-function-name
366
-
```
341
+
### Lambda edge
367
342
368
-
Refer to [Supabase's official documentation](https://supabase.com/docs) for more details.
0 commit comments