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
First of all I want to say that I may not be aware of every way to deal with this problem, but as far as I've seen it makes no sense to me.
I have just switched to the new docker compose command to find out, that the precedence of environment files changed around a couple of years ago. I have a docker-compose.yml that expect a DENO_PORT environment variable from the .env file to start a Deno app inside the container using the ports 5000:5000. Now, while I am updating the application locally, I need to start the same app in a different port with live reloading. The Application is expecting to get the port from the environment variable DENO_PORT, so... If I set DENO_PORT to 5001 in zshrc and to 5000 in the .env file, it doesn't work anymore. Now it's always the port 5001, I can't have the same variable with different values between my host and my containers, how is that a good idea? Why is it a good practice to have exactly the same?
How is it possible that now I need two variables to accomplish the same thing? Is there something I am missing? How is this better for other user cases?
The text was updated successfully, but these errors were encountered:
I am also facing similar issue as well. Can someone please explain how I can override the shell variables from HOST in the container gracefully with .env files
Description
First of all I want to say that I may not be aware of every way to deal with this problem, but as far as I've seen it makes no sense to me.
I have just switched to the new docker compose command to find out, that the precedence of environment files changed around a couple of years ago. I have a docker-compose.yml that expect a DENO_PORT environment variable from the .env file to start a Deno app inside the container using the ports 5000:5000. Now, while I am updating the application locally, I need to start the same app in a different port with live reloading. The Application is expecting to get the port from the environment variable DENO_PORT, so... If I set DENO_PORT to 5001 in zshrc and to 5000 in the .env file, it doesn't work anymore. Now it's always the port 5001, I can't have the same variable with different values between my host and my containers, how is that a good idea? Why is it a good practice to have exactly the same?
How is it possible that now I need two variables to accomplish the same thing? Is there something I am missing? How is this better for other user cases?
The text was updated successfully, but these errors were encountered: