Skip to content

Commit 56c575c

Browse files
committed
[Docs]: Add example of setting a PostgreSQL URL
1 parent 034ae29 commit 56c575c

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

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)