You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In these I'm not passing the MySQL password directly as an environment variable. Instead, I'm passing the path to a file that contains the password.
156
+
157
+
That file is created by your Docker orchestration framework's secrets management system. That's a mouthful to say: you define the secret in your orchestration framework, and the framework creates a file which contains the password. That way, the password isn't stored in the environment which is a bit unsafe.
158
+
159
+
Your application (or, in this case, MySQL), would have to read the contents of the image to find the password.
160
+
161
+
More info on this when we learn about deploying our app in production!
162
+
:::
163
+
154
164
## How to run multiple containers using Docker Compose
155
165
156
166
1. Create a `docker-compose.yml` file in the root of your project.
0 commit comments