Skip to content

Commit 4a950e9

Browse files
committed
DBOS_SYSTEM_DATABASE_URL
1 parent 94239e2 commit 4a950e9

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,4 +173,4 @@ Install the DBOS Transact package in your program:
173173
github.com/dbos-inc/dbos-transact-go
174174
```
175175

176-
You can store and export a Postgres connection string in the `DBOS_DATABASE_URL` environment variable for DBOS to manage your workflows state. By default, DBOS will use `postgres://postgres:${PGPASSWORD}@localhost:5432/dbos?sslmode=disable`.
176+
You can store and export a Postgres connection string in the `DBOS_SYSTEM_DATABASE_URL` environment variable for DBOS to manage your workflows state. By default, DBOS will use `postgres://postgres:${PGPASSWORD}@localhost:5432/dbos?sslmode=disable`.

dbos/admin-server_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ import (
1313

1414
func TestAdminServer(t *testing.T) {
1515
// Skip if database is not available
16-
databaseURL := os.Getenv("DBOS_DATABASE_URL")
16+
databaseURL := os.Getenv("DBOS_SYSTEM_DATABASE_URL")
1717
if databaseURL == "" && os.Getenv("PGPASSWORD") == "" {
18-
t.Skip("Database not available (DBOS_DATABASE_URL and PGPASSWORD not set), skipping DBOS integration tests")
18+
t.Skip("Database not available (DBOS_SYSTEM_DATABASE_URL and PGPASSWORD not set), skipping DBOS integration tests")
1919
}
2020

2121
t.Run("Admin server is not started without WithAdminServer option", func(t *testing.T) {

dbos/dbos.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ func NewConfig(programmaticConfig config) *config {
100100
dbosConfig := &config{}
101101

102102
// Start with environment variables (lowest precedence)
103-
if dbURL := os.Getenv("DBOS_DATABASE_URL"); dbURL != "" {
103+
if dbURL := os.Getenv("DBOS_SYSTEM_DATABASE_URL"); dbURL != "" {
104104
dbosConfig.databaseURL = dbURL
105105
}
106106

@@ -117,7 +117,7 @@ func NewConfig(programmaticConfig config) *config {
117117

118118
// Load defaults
119119
if len(dbosConfig.databaseURL) == 0 {
120-
getLogger().Info("DBOS_DATABASE_URL not set, using default: postgres://postgres:${PGPASSWORD}@localhost:5432/dbos?sslmode=disable")
120+
getLogger().Info("DBOS_SYSTEM_DATABASE_URL not set, using default: postgres://postgres:${PGPASSWORD}@localhost:5432/dbos?sslmode=disable")
121121
password := url.QueryEscape(os.Getenv("PGPASSWORD"))
122122
dbosConfig.databaseURL = fmt.Sprintf("postgres://postgres:%s@localhost:5432/dbos?sslmode=disable", password)
123123
}

dbos/utils_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
func setupDBOS(t *testing.T) {
1717
t.Helper()
1818

19-
databaseURL := os.Getenv("DBOS_DATABASE_URL")
19+
databaseURL := os.Getenv("DBOS_SYSTEM_DATABASE_URL")
2020
if databaseURL == "" {
2121
password := url.QueryEscape(os.Getenv("PGPASSWORD"))
2222
databaseURL = fmt.Sprintf("postgres://postgres:%s@localhost:5432/dbos?sslmode=disable", password)
@@ -30,7 +30,7 @@ func setupDBOS(t *testing.T) {
3030

3131
dbName := parsedURL.Database
3232
if dbName == "" {
33-
t.Skip("DBOS_DATABASE_URL does not specify a database name, skipping integration test")
33+
t.Skip("DBOS_SYSTEM_DATABASE_URL does not specify a database name, skipping integration test")
3434
}
3535

3636
postgresURL := parsedURL.Copy()

0 commit comments

Comments
 (0)