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/concepts/configuration.md
+12-1Lines changed: 12 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,14 +23,25 @@ defang config set API_KEY
23
23
24
24
You can use sensitive config by specifying them in the `environment` section of a service in a `compose.yaml` file without any value, or by specifying an environment key with a `null` value in your Pulumi code.
25
25
26
-
```ts
26
+
```yaml
27
27
services:
28
28
service1:
29
29
image: image1:latest
30
30
environment:
31
31
- API_KEY
32
32
```
33
33
34
+
You can also use this syntax:
35
+
36
+
37
+
```yaml
38
+
services:
39
+
service1:
40
+
image: image1:latest
41
+
environment:
42
+
API_KEY:
43
+
```
44
+
34
45
Use the `defang config` command of the Defang CLI to manage the values.
Copy file name to clipboardExpand all lines: docs/concepts/managed-storage.md
+34-5Lines changed: 34 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ Redis is an in-memory data structure store widely used for caching, real-time an
19
19
To use managed Redis, in your `compose.yaml` file, use the `x-defang-redis` extension to define your Redis service. Adding the annotation will tell Defang to provision a managed instance, rather than running Redis as a service. Here's an example:
20
20
21
21
```yaml
22
-
redisx:
22
+
cache:
23
23
image: redis:6.2
24
24
x-defang-redis: true
25
25
restart: unless-stopped
@@ -30,12 +30,41 @@ To use managed Redis, in your `compose.yaml` file, use the `x-defang-redis` exte
30
30
31
31
## Managed Postgres
32
32
33
-
:::info
34
-
As of July 22, 2024, managed Postgres is in development.
35
-
:::
36
-
37
33
Postgres, or PostgreSQL, is an advanced open-source relational database system known for its robustness, extensibility, and compliance with SQL standards, making it a popular choice for complex applications requiring reliable data integrity and sophisticated querying capabilities.
38
34
35
+
### How to use Managed Postgres
36
+
37
+
To use managed Postgres, in your `compose.yaml` file, use the `x-defang-postgres` extension to define your Postgres service. Adding the annotation will tell Defang to provision a managed instance, rather than running Postgres as a service.
38
+
39
+
#### Configuration
40
+
41
+
When using managed Postgres, you must set a password for the database using `defang config set POSTGRES_PASSWORD`. If you do not provide the password, the deployment will fail. You can can assign the password in the service's environment variables as described in the [config section](./configuration.md).
42
+
43
+
You can also optionally set the following, using `defang config set`:
44
+
45
+
* `POSTGRES_USER`: The user for the managed Postgres instance. The default is `postgres`.
46
+
* `POSTGRES_DB`: The database name for the managed Postgres instance. The default is `postgres`.
47
+
48
+
#### Connecting to Managed Postgres
49
+
50
+
You can connect to the managed Postgres instance using the `POSTGRES_HOST`, `POSTGRES_USER`, and `POSTGRES_PASSWORD` environment variables.
0 commit comments