Skip to content

Commit 2a3dab9

Browse files
committed
enhance configuration page
1 parent fabc10f commit 2a3dab9

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

docs/concepts/configuration.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,9 @@ sidebar_position: 225
66

77
# Configuration
88

9-
Defang allows you to configure your application using environment variables. You can set environment variables in your [`compose.yaml` file](./compose.md), or in your [Pulumi program](./pulumi.md). Using Pulumi gives you the advantage of being able to manage your environment variables across different environments using Pulumi stacks.
9+
Defang allows you to configure your application using environment variables. You can set environment variables in your [`compose.yaml` file](./compose.md), or in your [Pulumi program](#using-config-with-pulumi).
1010

11-
:::tip Sample
12-
You can find a sample of how to set environment variables with Pulumi [here](https://github.com/DefangLabs/defang/tree/main/samples/nodejs/remix-aiven-postgres).
13-
:::
14-
15-
# Sensitive Config aka Secrets
11+
# Sensitive Config (aka Secrets)
1612

1713
The Defang CLI allows you to securely store sensitive information such as API keys, passwords, and other credentials. To do so, run:
1814

@@ -44,6 +40,10 @@ services:
4440
4541
Use the `defang config` command of the Defang CLI to manage the values.
4642

43+
:::tip
44+
You can find a sample of how to set sensitive config values [here](https://github.com/DefangLabs/samples/tree/main/samples/nodejs-openai).
45+
:::
46+
4747
## Interpolation
4848

4949
Environment variables are set within the *environment* section of a service in a `compose.yaml` file. Any variables declared here will become available within the service container.
@@ -62,18 +62,24 @@ In the example above, if we assume the value of the configuration variable ***US
6262
6363
During `defang compose up` all variable references will be replaced with the actual value and made available in the container. If any referenced variable is not found the `defang compose up` command will be canceled.
6464
65+
## Using Config with Pulumi
66+
In Defang, using config with [Pulumi](./pulumi.md) gives you the advantage of being able to manage your environment variables across different environments using Pulumi stacks.
67+
68+
:::tip
69+
You can find a sample of how to set environment variables with Pulumi [here](https://github.com/DefangLabs/samples/tree/main/samples/pulumi-remix-postgres).
70+
:::
71+
6572
## Connecting Services
6673
6774
If you have created a service before a secret you can connect it by running the `defang compose start` command if using the [`defang compose` workflow](./compose.md). If you are using the [Pulumi-based workflow](./pulumi.md) you will need to redeploy using Pulumi.
6875
69-
:::tip Sample
70-
You can find a sample of how to set sensitive config values [here](https://github.com/DefangLabs/defang/tree/main/samples/nodejs/ChatGPT%20API).
71-
:::
72-
7376
## Providers
7477
7578
Here are the different ways sensitive config values are stored depending on the provider you are using:
7679
7780
* [AWS](../providers/aws/aws.md#secrets)
81+
* [DigitalOcean](../providers/digitalocean#secrets)
82+
* [GCP](../providers/gcp#secrets)
83+
7884
7985

0 commit comments

Comments
 (0)