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

Manage mongo, and mqtt password through docker secrets #43

Open
danionescu0 opened this issue Jan 31, 2021 · 5 comments
Open

Manage mongo, and mqtt password through docker secrets #43

danionescu0 opened this issue Jan 31, 2021 · 5 comments

Comments

@danionescu0
Copy link
Owner

No description provided.

@neelabalan
Copy link
Contributor

Hi. I see that you have set up docker secrets for MQTT, Is it the same that has to be done for mongo as well?

@danionescu0
Copy link
Owner Author

Weell there are a few steps:

  1. modify docker-compose Mongodb service to work with username and password.
    You can test it's ok by starting the service and connect to it with username and password from mongo shell
  2. Add MongoDb secrets in secrets section
  3. Modify all docker-compose services that use MongoDb and add the secrets there
  4. Modify all python services to support connection with MongoDb credentials. I would make a function in utils.py that would handle connetion to eliminate duplicate code
  5. Run all tests to see if things are not broken

I've got stuck in step 1, i can't remember why..could not set MongoDb username and password.

You can start here: https://hub.docker.com/_/mongo theoretically it should be simple :)

mongo:
image: mongo
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: example

@neelabalan
Copy link
Contributor

Got it. This information is good enough for me to get started. I am also working on #20 and thinking of using pytest for it.

@danionescu0
Copy link
Owner Author

Great, keep me updated. If i can help you with anything ask me and we'll discuss it here.
Thanks , great work !

@neelabalan
Copy link
Contributor

Happy to work with you!

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

No branches or pull requests

2 participants