Docker MQTT deployment#48
Conversation
Modified dockerfile for auto deployment Modified mqtt_daemon.py to always use contract_id in topic
There was a problem hiding this comment.
Thanks for your PR. I put some comments, I just need to understand some of your changes.
Globally, I don't understand:
- Why you changed the dockerfile
- Why you changed the mqtt push data
- Why using docker-compose, when there is only one container ... a single docker command can do the trick
| set -e | ||
|
|
||
| # Copy config file if does not exists | ||
| rsync -a -v --ignore-existing config.yaml.sample config/config.yaml |
There was a problem hiding this comment.
For the persistence of the mqtt config file. You want to create the file if it's missing in the config without overwriting it.
There was a problem hiding this comment.
I would not do that, I think it better to crash if the file doesn't exists instead of copying a bad config file. What do you think ?
|
|
||
| COPY requirements.txt ./ | ||
| RUN pip install -r requirements.txt --force-reinstall --no-cache-dir | ||
| WORKDIR /usr/pyhydroquebec |
There was a problem hiding this comment.
Why do you change the working dir ?
There was a problem hiding this comment.
I put everything in the same root folder instead of having one root folder for the code and one root folder for the config.
There was a problem hiding this comment.
OK, but /usr/SOMETHING it's a weird folder. I would use something like /usr/local/pyhydroquebec.
In fact, we are copyng application's sources, that's why I put /usr/src/app, but I should put /usr/local/src/pyhydroquebec.
What do you think using /usr/local/src/pyhydroquebec ?
|
Thanks for the review, Why you changed the dockerfile Why you changed the mqtt push data Why using docker-compose, when there is only one container ... a single docker command can do the trick |
|
Thanks for your answers !!
I'm sorry but I still don't understand those changes in the Dockerfile. Today, I'm using the current master docker image with MQTT without any issue. What are the issues that you're a trying to solve with theses change ?
Thanks for this one !
OK, Thanks for this one too ! |
|
BTW, I will handle the merge conflict (I created it ...) |
Modified your project to deploy with docker-compose and fix the configuration implementation (mqtt).