@@ -217,16 +217,20 @@ joe_meta_path="/home/ubuntu/.dblab/joe/meta"
217
217
mkdir -p $joe_config_path
218
218
mkdir -p $joe_meta_path
219
219
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
230
234
231
235
sudo docker run \
232
236
--name joe_bot \
0 commit comments