Skip to content

Commit 1705100

Browse files
authored
[cuebot] DB optional env vars to streamline custom deployment (#2076)
**Summary** Add the possibility to set optional env vars to connect to the db. **Changes** In the `opencue.properties` file, add 3 new environment variables to simplify the deployment: `CUEBOT_DB_URL`: URL of the Postgres database. `CUEBOT_DB_USER`: the username to use to connect to the Postgres database `CUEBOT_DB_PASSWORD`: the password to use to connect to the Postgres database Those environment variables are optional. Default behavior stays unchanged. **Why** Streamline custom config of cuebot and db setup on client side. **Feedback** Any documentation you would recommend updating?
1 parent a5827b8 commit 1705100

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cuebot/src/main/resources/opencue.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ cue.proxy = tcp -h cuetest01-vm -p 9019 -t 10000:tcp -h cuetest02-vm -p 9019 -t
22
spring.velocity.checkTemplateLocation=false
33

44
datasource.cue-data-source.driver-class-name=org.postgresql.Driver
5-
datasource.cue-data-source.jdbc-url=jdbc:postgresql://dbhost/dbname
6-
datasource.cue-data-source.username=cue
7-
datasource.cue-data-source.password=password
5+
datasource.cue-data-source.jdbc-url=${CUEBOT_DB_URL:"jdbc:postgresql://dbhost/dbname"}
6+
datasource.cue-data-source.username=${CUEBOT_DB_USER:cue}
7+
datasource.cue-data-source.password=${CUEBOT_DB_PASSWORD:password}
88

99
# HikariCP Configuration
1010
# Maximum lifetime of a connection in milliseconds (5 hours = 18000000 ms)

0 commit comments

Comments
 (0)