Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting _MP_DATABASE__READONLY_URL fails with malformed JDBC connection string #39

Open
johnrash opened this issue Aug 8, 2023 · 0 comments

Comments

@johnrash
Copy link

johnrash commented Aug 8, 2023

Setting the environment variable _MP_DATABASE__READONLY_URL results in a malformed JDBC connection string in mirth.properties as forward slashes are escaped when being parsed by entrypoint.sh

_MP_DATABASE__READONLY_URL=jdbc:postgresql://db.hostname.example.com:5432/mirthdb
becomes
database-readonly.url = jdbc:postgresql:\\/\\/db.hostname.example.com:5432\\/mirthdb

Removing the toothpicks from ${VALUE} in a custom image fixed the issue for me
sed -i "s/^${ESCAPED_KEY}\s*=\s*.*\$/${ACTUAL_KEY} = ${VALUE//\//\\/}/" /opt/connect/conf/mirth.properties
to
sed -i "s/^${ESCAPED_KEY}\s*=\s*.*\$/${ACTUAL_KEY} = ${VALUE}/" /opt/connect/conf/mirth.properties

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants