I have following your example for my production docker environment. However when i tried to create another database container for testing it cannot connect to the testing database. I tried to track the problem and it lead me to the environment variable in docker-compose.yml in app container. When i try to remove the enviroment variable the apps cannot connect to the database at all.
Can you explain how the environment variable working ? and can we made that value dynamic (consider my condition i required the apps to connected into different container database)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Nice Tutorial!
I have following your example for my production docker environment. However when i tried to create another database container for testing it cannot connect to the testing database. I tried to track the problem and it lead me to the environment variable in docker-compose.yml in app container. When i try to remove the enviroment variable the apps cannot connect to the database at all.
Can you explain how the environment variable working ? and can we made that value dynamic (consider my condition i required the apps to connected into different container database)