.env.local in production env #1973
Unanswered
senorLobito
asked this question in
Q&A
Replies: 1 comment
-
Ok, I should put it much easier. The .env.local is by default present in api/.dockerignore. That's why it never gets to container and thus never gets picked by composer dump-env command. The question is, why is it so? Since I should naturally use .env.local in all environments and default specification does not allow this, there must be reason behind this. Thanks again for any comment. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I have a question probably trivial, but I still can't get it so I better ask.
I've been using api platform for couple of months now in the DEV environment. Recently has come the moment to try to release the app to test server in PROD env mode. After sequence of trial-and-error procedures, I was finally able to make the app run.
However, there is one thing I don't get (amongst others) and want to understand: using the api/.env.local works well in dev environment. But once the APP_ENV is switched to prod using docker-compose.prod.yml, the .env.local does not take effect. The reason is clear: the .env.local is not being copied to container in PROD mode. However I cannot find the place which decides based on APP_ENV value, whether copy all the .env files to container or whether do composer dump-env prod and create just .env.local.php based on .env.
I guess it will be something with docker-compose stages, but I guess I still don't fully understand this feature.
Can anybody clarify this for me?
Thanks a lot!
Beta Was this translation helpful? Give feedback.
All reactions