DEV Community

Discussion on: Using variables in Docker-Compose

Collapse
 
ucavalcante profile image
Ulisses Cavalcante

Tks @nyagarcia it's great article and will help me a lot, but I believe you repeat 2 times first github example.

Collapse
 
nyagarcia profile image
Nya

Thank you :) Are you sure? If you take a close look, all three GitHub gists are different. The first two are very similar though, I can understand the confusion :D

The difference is in the value of the environment variables. In the first example, their values are hard-coded. In the second example, they are obtained from the .env file via string interpolation.