Skip to content

Commit c94d8a9

Browse files
Merge pull request #30 from eliona-smart-building-assistant/init_connection
use init connection string
2 parents dcd8f71 + ee86264 commit c94d8a9

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ To start and initialize an app in an Eliona environment, the app have to registe
1818

1919
- `APPNAME`: must be set to `hailo`. Some resources use this name to identify the app inside an Eliona environment.
2020

21-
- `CONNECTION_STRING`: configures the [Eliona database](https://github.com/eliona-smart-building-assistant/go-eliona/tree/main/db). Otherwise, the app can't be initialized and started. (e.g. `postgres://user:pass@localhost:5432/iot`)
21+
- `CONNECTION_STRING`: configures the [Eliona database](https://github.com/eliona-smart-building-assistant/go-eliona/tree/main/db). Otherwise, the app can't be initialized and started (e.g. `postgres://user:pass@localhost:5432/iot`).
22+
23+
- `INIT_CONNECTION_STRING`: configures the [Eliona database](https://github.com/eliona-smart-building-assistant/go-eliona/tree/main/db) for app initialization like creating schema and tables (e.g. `postgres://user:pass@localhost:5432/iot`). Default is content of `CONNECTION_STRING`.
2224

2325
- `API_ENDPOINT`: configures the endpoint to access the [Eliona API v2](https://github.com/eliona-smart-building-assistant/eliona-api). Otherwise, the app can't be initialized and started. (e.g. `http://api-v2:3000/v2`)
2426

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.18
44

55
require (
66
github.com/eliona-smart-building-assistant/app-integration-tests v0.0.5
7-
github.com/eliona-smart-building-assistant/go-eliona v1.9.28
7+
github.com/eliona-smart-building-assistant/go-eliona v1.9.29
88
github.com/eliona-smart-building-assistant/go-eliona-api-client/v2 v2.6.1
99
github.com/eliona-smart-building-assistant/go-utils v1.0.60
1010
github.com/friendsofgo/errors v0.9.2

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5O
118118
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
119119
github.com/eliona-smart-building-assistant/app-integration-tests v0.0.5 h1:syohiP7FaNhWRAE+fTBLqN6B4T2mrWt2WNikM/Wq4Sc=
120120
github.com/eliona-smart-building-assistant/app-integration-tests v0.0.5/go.mod h1:D5fA+9HOneH/CuBU0W0fkPb16QERDA9+N7eejKPS6rI=
121-
github.com/eliona-smart-building-assistant/go-eliona v1.9.28 h1:5SgUmMGDJGTVqvu8Hg8/MWfpLkk6bO9aAIr92rVp5/E=
122-
github.com/eliona-smart-building-assistant/go-eliona v1.9.28/go.mod h1:YLc8XQa9aW/y938caBypT8+bLJUVsFNV+KhRtKx/Zk8=
121+
github.com/eliona-smart-building-assistant/go-eliona v1.9.29 h1:pbEo+Rphy/KjjKq/f4m8f5calNNqlbOYrvDEXuHlgwU=
122+
github.com/eliona-smart-building-assistant/go-eliona v1.9.29/go.mod h1:YLc8XQa9aW/y938caBypT8+bLJUVsFNV+KhRtKx/Zk8=
123123
github.com/eliona-smart-building-assistant/go-eliona-api-client/v2 v2.6.1 h1:KgvO7+jACdn3QjPIPNXBzluZdhVze7NX21FEkH3ek7E=
124124
github.com/eliona-smart-building-assistant/go-eliona-api-client/v2 v2.6.1/go.mod h1:GsmIYeSRwPLX/Kg2yYtxIfhqAvoCjLP/X/k2YALLVSg=
125125
github.com/eliona-smart-building-assistant/go-utils v1.0.60 h1:Ae6lK1mljoIIkLGbORVquwDxkVIrmtPOo+2P9veAp9g=

metadata.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,10 @@
1414
],
1515
"apiUrl": "v1",
1616
"apiSpecificationPath": "/version/openapi.json",
17-
"useEnvironment": [ "CONNECTION_STRING", "API_ENDPOINT", "API_TOKEN" ]
17+
"useEnvironment": [
18+
"CONNECTION_STRING",
19+
"INIT_CONNECTION_STRING",
20+
"API_ENDPOINT",
21+
"API_TOKEN"
22+
]
1823
}

0 commit comments

Comments
 (0)