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:27017I ham trying to express this in Cloudron syntax in
start.shfor 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
mongousername 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. -
N nebulon marked this topic as a question on
-
N nebulon has marked this topic as solved on
-
Cool, that makes it more concise and less open to mis-use (by me
)
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login