Open pgraverdy opened 2 years ago
@pgraverdy
flask_in_docker
where I have dockerised the flask app. I have added the instructions to run it in the readme. It automatically builds image and runs the app.Let me know if I should create a PR for this issue.
@pgraverdy
Ways to connect containers:
docker
to connect between two containers. This network can be user modified.@azlaanmsamad
Regarding the apps in the two containers (flask and rabbitmq) the communication protocol between them is AMQP, so its a networking protocol. There is no shared data/state between them. Hence the two solutions are
As a side note, sharing volumes between containers (when relevant) has to be carefully done, You just can't access the files containing the data from a DB from another container (it will definitively create inconsistencies in the database). Sharing a volume for read access is fine, not for write access.
@pgraverdy
Okay thank you for the explanation. In case two app containers are using the same database to write files, how do we avoid inconsistency?
@pgraverdy
Should I create a PR for this?
In the document, it is stated that all components should be dockerized.