Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions frontend/src/app/dialogs/tokens-frame.tsx

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 44 additions & 3 deletions frontend/src/app/env-variables.tsx

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 39 additions & 15 deletions frontend/src/app/publishable-token-code-group.tsx

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ The deployment process involves four key steps:
cwd: projectDir,
env: {
...process.env,
// Using separate variables (both formats work)
VITE_RIVET_ENDPOINT: "https://api.rivet.dev",
VITE_RIVET_NAMESPACE: engineNamespaceName,
VITE_RIVET_TOKEN: publishableToken,
Expand All @@ -133,6 +134,7 @@ The deployment process involves four key steps:

const { deploymentId } = await freestyle.deployWeb(deploymentSource, {
envVars: {
// Using separate variables (both formats work)
RIVET_ENDPOINT: "https://api.rivet.dev",
RIVET_NAMESPACE: engineNamespaceName,
RIVET_TOKEN: runnerToken,
Expand Down Expand Up @@ -242,6 +244,7 @@ The deployment process involves four key steps:
cwd: projectDir,
env: {
...process.env,
// Using separate variables (both formats work)
VITE_RIVET_ENDPOINT: RIVET_ENDPOINT,
VITE_RIVET_NAMESPACE: namespace.name,
VITE_RIVET_TOKEN: RIVET_TOKEN,
Expand All @@ -256,6 +259,7 @@ The deployment process involves four key steps:

const { deploymentId } = await freestyle.deployWeb(deploymentSource, {
envVars: {
// Using separate variables (both formats work)
RIVET_ENDPOINT,
RIVET_NAMESPACE: namespace.name,
RIVET_TOKEN,
Expand Down
2 changes: 1 addition & 1 deletion website/src/content/docs/clients/react.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const { useActor } = createRivetKit<typeof registry>();

#### Parameters

- `endpoint`: Optional endpoint URL (defaults to `http://localhost:6420` or `process.env.RIVET_ENDPOINT`)
- `endpoint`: Optional endpoint URL (defaults to `http://localhost:6420` or `process.env.RIVET_ENDPOINT`). Supports unified format with embedded credentials: `https://namespace:token@api.rivet.dev`
- `options`: Optional configuration object

#### Returns
Expand Down
30 changes: 29 additions & 1 deletion website/src/content/docs/connect/aws-ecs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,14 @@ Run your backend on Amazon ECS with Fargate using a simple container image and s
</Step>
<Step title="Generate Environment Variables">

Navigate to Rivet and click _Connect > Manual_. Copy the environment variables provided, they will be used in the task definition. They should look something like this:
Navigate to Rivet and click _Connect > Manual_. Copy the environment variables provided, they will be used in the task definition. You can use either the unified endpoint format or separate variables:

**Unified Format (Recommended):**
```bash
RIVET_ENDPOINT=https://your-namespace-id:your-token@api-us-west-1.rivet.dev
```

**Separate Variables:**
```bash
RIVET_ENDPOINT=https://api-us-west-1.rivet.dev
RIVET_NAMESPACE=your-namespace-id
Expand Down Expand Up @@ -55,6 +61,28 @@ docker push 123456789012.dkr.ecr.us-east-1.amazonaws.com/backend:latest

Create `backend-task.json` describing the ECS task. Update the ARNs, subnets, and security groups for your environment.

**With Unified Format (Recommended):**
```json
{
"family": "backend",
"networkMode": "awsvpc",
"cpu": "256",
"memory": "512",
"requiresCompatibilities": ["FARGATE"],
"executionRoleArn": "arn:aws:iam::123456789012:role/ecsTaskExecutionRole",
"containerDefinitions": [
{
"name": "backend",
"image": "123456789012.dkr.ecr.us-east-1.amazonaws.com/backend:latest",
"environment": [
{ "name": "RIVET_ENDPOINT", "value": "https://your-namespace-id:your-token@api-us-west-1.rivet.dev" }
]
}
]
}
```

**Or With Separate Variables:**
```json
{
"family": "backend",
Expand Down
19 changes: 18 additions & 1 deletion website/src/content/docs/connect/gcp-cloud-run.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,14 @@ Run your backend on Cloud Run with a lightweight container image and one command
</Step>
<Step title="Generate Environment Variables">

Navigate to Rivet and click _Connect > Manual_. Copy the environment variables provided, they will be used when deploying. They should look something like this:
Navigate to Rivet and click _Connect > Manual_. Copy the environment variables provided, they will be used when deploying. You can use either the unified endpoint format or separate variables:

**Unified Format (Recommended):**
```bash
RIVET_ENDPOINT=https://your-namespace-id:your-token@api-us-west-1.rivet.dev
```

**Separate Variables:**
```bash
RIVET_ENDPOINT=https://api-us-west-1.rivet.dev
RIVET_NAMESPACE=your-namespace-id
Expand Down Expand Up @@ -52,6 +58,17 @@ gcloud builds submit --tag us-central1-docker.pkg.dev/YOUR_PROJECT/backend/backe

Deploy the service to Cloud Run, passing the Rivet environment variables. Adjust the region, image, and VPC connector settings as needed.

**With Unified Format (Recommended):**
```bash
gcloud run deploy backend \
--image us-central1-docker.pkg.dev/YOUR_PROJECT/backend/backend:latest \
--region us-central1 \
--allow-unauthenticated \
--min-instances 1 \
--set-env-vars RIVET_ENDPOINT=https://your-namespace-id:your-token@api-us-west-1.rivet.dev
```

**Or With Separate Variables:**
```bash
gcloud run deploy backend \
--image us-central1-docker.pkg.dev/YOUR_PROJECT/backend/backend:latest \
Expand Down
Loading