Skip to content

Commit e8e287f

Browse files
authored
Update managed-postgres.md
1 parent ecc31a0 commit e8e287f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

docs/concepts/managed-storage/managed-postgres.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,13 @@ To use managed Postgres, in your `compose.yaml` file, use the `x-defang-postgres
2222

2323
### Required Configuration
2424

25-
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 (to learn more about how this works, read about [configuration](../configuration.md)).
25+
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.
26+
27+
- `POSTGRES_PASSWORD`: You can can assign the password in the service's environment variables. To learn more about how this works, read about [configuration](../configuration.md).
2628

2729
### Optional Configuration
2830

29-
You can also set the following environment variables to configure the managed Postgres instance:
31+
You can also set the following optional environment variables to configure the managed Postgres instance:
3032

3133
- `POSTGRES_USER`: The user for the managed Postgres instance. The default is `postgres`.
3234
- `POSTGRES_DB`: The database name for the managed Postgres instance. The default is `postgres`.
@@ -51,11 +53,10 @@ You can connect to the managed Postgres instance using the name of your service
5153
// highlight-end
5254
# Note: you can create a connection string by using interpolation,
5355
# reference config variables by using ${<config name>}
54-
CONNECTURL: postgresql://${POSTGRES_PASSWORD}@database:5432/postgres
56+
CONNECTURL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@database:5432/${POSTGRES_DB}
5557
database:
5658
image: postgres:15
5759
x-defang-postgres: true
58-
restart: unless-stopped
5960
ports:
6061
- mode: host
6162
target: 5432

0 commit comments

Comments
 (0)