Skip to content

Commit 3b27372

Browse files
authored
Support mysql8 and postgres12 dbs in docker config template (#3941)
1 parent 4f5b1b0 commit 3b27372

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

docker/config_template.yaml

+8-7
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ persistence:
7474
advertised-hostname: {{ default .Env.CASSANDRA_ADDRESS_TRANSLATOR_OPTIONS "" }}
7575
{{- end }}
7676
{{- end }}
77-
{{- else if eq $db "mysql" }}
77+
{{- else if eq $db "mysql" "mysql8" }}
7878
default:
7979
sql:
80-
pluginName: "mysql"
80+
pluginName: "{{ $db }}"
8181
databaseName: "{{ default .Env.DBNAME "temporal" }}"
8282
connectAddr: "{{ default .Env.MYSQL_SEEDS "" }}:{{ default .Env.DB_PORT "3306" }}"
8383
connectProtocol: "tcp"
@@ -98,7 +98,7 @@ persistence:
9898
enableHostVerification: {{ default .Env.SQL_HOST_VERIFICATION "false" }}
9999
serverName: {{ default .Env.SQL_HOST_NAME "" }}
100100
visibility:
101-
sql:
101+
sql:
102102
{{ $visibility_seeds_default := default .Env.MYSQL_SEEDS "" }}
103103
{{ $visibility_seeds := default .Env.VISIBILITY_MYSQL_SEEDS $visibility_seeds_default }}
104104
{{ $visibility_port_default := default .Env.DB_PORT "3306" }}
@@ -107,7 +107,7 @@ persistence:
107107
{{ $visibility_user := default .Env.VISIBILITY_MYSQL_USER $visibility_user_default }}
108108
{{ $visibility_pwd_default := default .Env.MYSQL_PWD "" }}
109109
{{ $visibility_pwd := default .Env.VISIBILITY_MYSQL_PWD $visibility_pwd_default }}
110-
pluginName: "mysql"
110+
pluginName: "{{ $db }}"
111111
databaseName: "{{ default .Env.VISIBILITY_DBNAME "temporal_visibility" }}"
112112
connectAddr: "{{ $visibility_seeds }}:{{ $visibility_port }}"
113113
connectProtocol: "tcp"
@@ -127,10 +127,11 @@ persistence:
127127
keyFile: {{ default .Env.SQL_CERT_KEY "" }}
128128
enableHostVerification: {{ default .Env.SQL_HOST_VERIFICATION "false" }}
129129
serverName: {{ default .Env.SQL_HOST_NAME "" }}
130-
{{- else if eq $db "postgresql" }}
130+
{{- else if eq $db "postgresql" "postgres" "postgres12" }}
131+
{{- $db := replace $db "postgresql" "postgres" 1 }}
131132
default:
132133
sql:
133-
pluginName: "postgres"
134+
pluginName: "{{ $db }}"
134135
databaseName: "{{ default .Env.DBNAME "temporal" }}"
135136
connectAddr: "{{ default .Env.POSTGRES_SEEDS "" }}:{{ default .Env.DB_PORT "5432" }}"
136137
connectProtocol: "tcp"
@@ -156,7 +157,7 @@ persistence:
156157
{{ $visibility_user := default .Env.VISIBILITY_POSTGRES_USER $visibility_user_default }}
157158
{{ $visibility_pwd_default := default .Env.POSTGRES_PWD "" }}
158159
{{ $visibility_pwd := default .Env.VISIBILITY_POSTGRES_PWD $visibility_pwd_default }}
159-
pluginName: "postgres"
160+
pluginName: "{{ $db }}"
160161
databaseName: "{{ default .Env.VISIBILITY_DBNAME "temporal_visibility" }}"
161162
connectAddr: "{{ $visibility_seeds }}:{{ $visibility_port }}"
162163
connectProtocol: "tcp"

0 commit comments

Comments
 (0)