I'm starting to migrate my Application to Docker containers: I use Ngnix, supervisord, gunicorn, python flask, celery, flower, lighttpd, RabbitMQ and Postgresql. In my original virtual machine, I keep all my configurations under /usr/local/src/application/conf/ In settings.py I define my:
SQLALCHEMY_DATABASE_URI
In celeryconfig.py I define:
BROKER_URL
I will create 5 containers:
- Ngnix load balancer
- Flask API
- Celery
- RabbitMQ
- Lighttpd
I'm using docker-compose and volumes. Since right now all my IP addresses are localhost (127.0.0.1)
What's the recommendation for each of my containers to access a common configuration? Volumes?
How do I know which IP address is assigned to each container so I can define my settings? For example when RabbitMQ starts what IP should I configure in BROKER_URL?
Since my Docker application will still point to my git repo can I point it to my host folder, should I use volumes here?