Correct mongodb connection parameters?
-
I am trying to package the CodexDocs app, and am struggling to express the required connection string in Cloudron format.
The 'native' command is an environment variable :
APP_CONFIG_database_mongodb_uri=mongodb://mongo:fe7cb9063db50ab63c87@codexdocs_codex-db:27017
I ham trying to express this in Cloudron syntax in
start.sh
for mongodb addon as :
export APP_CONFIG_database_mongodb_uri=mongodb://${CLOUDRON_MONGODB_USERNAME}:${CLOUDRON_MONGODB_PASSWORD}@${CLOUDRON_MONGODB_DATABASE}:${CLOUDRON_MONGODB_PORT}
But I am getting
AuthenticationFailed
And I can't see what is wrong.
Just checking with y'all if my statement looks ok.Then I will try to check if the app is trying to connect with
mongo
username instead of${CLOUDRON_MONGODB_USERNAME}
-
Oh interesting, so it could be just
mongodb://${CLOUDRON_MONGODB_URL}
, or it would still need user/password ? -
Blundering about with trial&error, I managed to get it working by appending the database parameter.
export APP_CONFIG_database_mongodb_uri=mongodb://${CLOUDRON_MONGODB_USERNAME}:${CLOUDRON_MONGODB_PASSWORD}@${CLOUDRON_MONGODB_HOST}:${CLOUDRON_MONGODB_PORT}/${CLOUDRON_MONGODB_DATABASE}
Sadly there is another problem with the app also experienced when I was using local storage that pages are not actually created. I thought it might be a folders/permissions issue so tried to side-step it with a database.
Thank you @nebulon for helping resolve that.
But <sigh> behaviour persists.
Oh well, I shall continuing investigating. -
-
-
Cool, that makes it more concise and less open to mis-use (by me )