diff --git a/tools/syn2mas/Dockerfile b/tools/syn2mas/Dockerfile index b1feb51d1..e804126e3 100644 --- a/tools/syn2mas/Dockerfile +++ b/tools/syn2mas/Dockerfile @@ -45,4 +45,4 @@ COPY --from=builder /syn2mas/dist ./dist ARG TARGETARCH COPY --from=deps /deps/${TARGETARCH}/node_modules ./node_modules -ENTRYPOINT ["/nodejs/bin/node", "--enable-source-maps", "dist/index.js"] +ENTRYPOINT ["/nodejs/bin/node", "--enable-source-maps", "/syn2mas/dist/index.js"] diff --git a/tools/syn2mas/src/db.mts b/tools/syn2mas/src/db.mts index 53eeb1c4b..1f1dcd249 100644 --- a/tools/syn2mas/src/db.mts +++ b/tools/syn2mas/src/db.mts @@ -57,7 +57,9 @@ export async function connectToSynapseDatabase({ database.args.sslkey && (ssl.key = await readFile(database.args.sslkey)); database.args.sslpassword && (ssl.passphrase = database.args.sslpassword); - connection.ssl = ssl; + if (Object.keys(ssl).length > 0) { + connection.ssl = ssl; + } return knex({ client: "pg", @@ -103,7 +105,9 @@ export async function connectToMASDatabase({ ssl.key = await readFile(database.ssl_key_file); } - connection.ssl = ssl; + if (Object.keys(ssl).length > 0) { + connection.ssl = ssl; + } return knex({ client: "pg",