Skip to content

Commit 27c869c

Browse files
committed
feat: update joe configurations
1 parent 060b8ce commit 27c869c

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

dle-logical-init.sh.tpl

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -217,16 +217,20 @@ joe_meta_path="/home/ubuntu/.dblab/joe/meta"
217217
mkdir -p $joe_config_path
218218
mkdir -p $joe_meta_path
219219

220-
# Copy configuration file from Packer-baked image.
221-
cp /home/ubuntu/joe.yml $joe_config_path/joe.yml
222-
223-
sed -ri "s/^(\s*)(debug:.*$)/\1debug: ${dle_debug_mode}/" $joe_config_path/joe.yml
224-
sed -ri "s/^(\s*)( token:.*$)/\1 token: ${platform_access_token}/" $joe_config_path/joe.yml
225-
sed -ri "s/^(\s*)( token:.*$)/\1 token: ${dle_verification_token}/" $joe_config_path/joe.yml
226-
sed -ri "s/^(\s*)( url:.*$)/\1 url: \"http\\:\\/\\/localhost\\:2345\"/" $joe_config_path/joe.yml
227-
sed -ri "s/^(\s*)(dbname:.*$)/\1dbname: ${source_postgres_dbname}/" $joe_config_path/joe.yml
228-
sed -ri "s/^(\s*)(signingSecret:.*$)/\1signingSecret: ${platform_joe_signing_secret}/" $joe_config_path/joe.yml
229-
sed -ri "s/^(\s*)(project:.*$)/\1project: ${platform_project_name}/" $joe_config_path/joe.yml
220+
curl https://gitlab.com/postgres-ai/joe/-/raw/${joe_version}/configs/config.example.yml --output $joe_config_path/joe.yml
221+
222+
yq e -i '
223+
.app.debug = ${dle_debug_mode} |
224+
.platform.token = ${platform_access_token} |
225+
.channelMapping.dblabServers.prod1.token = ${dle_verification_token} |
226+
.channelMapping.dblabServers.url.token = "http://localhost:2345" |
227+
.channelMapping.communicationTypes.webui[0].credentials.signingSecret = ${platform_joe_signing_secret} |
228+
.channelMapping.communicationTypes.webui[0].channels[0].project = ${platform_project_name} |
229+
.channelMapping.communicationTypes.webui[0].channels[0].dblabParams.dbname = ${source_postgres_dbname} |
230+
del(.channelMapping.communicationTypes.slack) |
231+
del(.channelMapping.communicationTypes.slackrtm) |
232+
del(.channelMapping.communicationTypes.slacksm)
233+
' $joe_config_path/joe.yml
230234

231235
sudo docker run \
232236
--name joe_bot \

0 commit comments

Comments
 (0)