Skip to content

Commit 28a1cda

Browse files
authored
[Docs]: Add example of setting a PostgreSQL URL (#2888)
1 parent 034ae29 commit 28a1cda

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

docs/docs/guides/server-deployment.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,11 @@ Postgres has no such limitation and is recommended for production deployment.
124124

125125
### PostgreSQL
126126

127-
To store the server state in Postgres, set the `DSTACK_DATABASE_URL` environment variable.
127+
To store the server state in Postgres, set the `DSTACK_DATABASE_URL` environment variable:
128+
129+
```shell
130+
$ DSTACK_DATABASE_URL=postgresql+asyncpg://user:password@db-host:5432/dstack dstack server
131+
```
128132

129133
??? info "Migrate from SQLite to PostgreSQL"
130134
You can migrate the existing state from SQLite to PostgreSQL using `pgloader`:

0 commit comments

Comments
 (0)