Skip to content

Commit a8cb7fe

Browse files
committed
restructure
1 parent 7442063 commit a8cb7fe

15 files changed

+58
-48
lines changed

src/content/docs/containers/beta-info.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
pcx_content_type: reference
33
title: Beta Info & Roadmap
44
sidebar:
5-
order: 2
5+
order: 9
66
---
77

88
Currently, Containers are in beta. There are several changes we plan to make prior to GA:

src/content/docs/containers/container-package.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
pcx_content_type: navigation
33
title: Container Package
44
sidebar:
5-
order: 8
5+
order: 5
66
---
77

88
When writing code that interacts with a container instance, you can either use a

src/content/docs/containers/faq.mdx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
pcx_content_type: navigation
33
title: Frequently Asked Questions
44
sidebar:
5-
order: 5
6-
group:
7-
hideIndex: true
5+
order: 10
86
---
97

108
import { WranglerConfig } from "~/components";

src/content/docs/containers/get-started.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
pcx_content_type: get-started
33
title: Getting started
44
sidebar:
5-
order: 1
5+
order: 2
66
---
77

88
import { WranglerConfig, PackageManagers } from "~/components";

src/content/docs/containers/local-dev.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
pcx_content_type: reference
33
title: Local Development
44
sidebar:
5-
order: 3
5+
order: 6
66
---
77

88
You can run both your container and your Worker locally, without additional configuration, by running [`npx wrangler dev`](/workers/wrangler/commands/#dev) (or `vite dev` for Vite projects using the [Cloudflare Vite plugin](/workers/vite-plugin/)) in your project's directory.

src/content/docs/containers/architecture.mdx renamed to src/content/docs/containers/platform-details/architecture.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
---
22
pcx_content_type: reference
3-
title: Architecture
3+
title: Container Lifecycle
44
sidebar:
5-
order: 9
5+
order: 1
66
---
77

8-
This page describes the architecture of Cloudflare Containers.
9-
108
## How and where containers run
119

1210
After you deploy a Worker that uses a Container, your image is uploaded to
File renamed without changes.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
pcx_content_type: reference
3+
title: Environment Variables
4+
sidebar:
5+
order: 7
6+
---
7+
8+
import { WranglerConfig } from "~/components";
9+
10+
## Runtime environment variables
11+
12+
The container runtime automatically sets the following variables:
13+
14+
- `CLOUDFLARE_APPLICATION_ID` - the ID of the Containers application
15+
- `CLOUDFLARE_COUNTRY_A2` - the [ISO 3166-1 Alpha 2 code](https://www.iso.org/obp/ui/#search/code/) of a country the container is placed in
16+
- `CLOUDFLARE_DEPLOYMENT_ID` - the ID of the container instance
17+
- `CLOUDFLARE_LOCATION` - a name of a location the container is placed in
18+
- `CLOUDFLARE_PLACEMENT_ID` - a placement ID
19+
- `CLOUDFLARE_REGION` - a region name
20+
- `CLOUDFLARE_DURABLE_OBJECT_ID` - the ID of the Durable Object that the container is bound to
21+
22+
## Custom environment variables
23+
24+
Custom environment variables can be set when defining a Container in your Worker:
25+
26+
```javascript
27+
class MyContainer extends Container {
28+
defaultPort = 4000;
29+
envVars = {
30+
MY_CUSTOM_VAR: "value",
31+
ANOTHER_VAR: "another_value",
32+
};
33+
}
34+
```
35+
36+
:::note
37+
If you supply environment variables with the same names, supplied values will override predefined values.
38+
:::
File renamed without changes.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
pcx_content_type: navigation
3+
title: Platform Reference
4+
sidebar:
5+
order: 4
6+
group:
7+
hideIndex: true
8+
---

0 commit comments

Comments
 (0)