-
I have a legacy app that I've migrated to the Symfony framework and am slowly taking advantage of more features of the framework. I'm starting to use Doctrine for new database tables and migrated tables, but still have to use a legacy PDO interface for some legacy databases. I'm trying to break up my database environment variables a bit so I don't have to edit values in multiple places for Doctrine and my legacy PDO interface. I'm attempting to use secrets for variables that need to be secret, and .env files for variables that are not sensitive. Here's the setup I'm trying to achieve:
The issue is that the variables defined in .env are not resolving with the values from the secrets. So when outputting the value of Edit: Maybe I'm approaching this wrong and should just be assigning the variables in my .env as parameters instead of environment variables? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Why don't you store the full MYSQL_DB_DSN as a secret and reference it in your config file just like the docs use it Secrets can be referenced just like other env vars in config file but not in the .env file from my understanding |
Beta Was this translation helpful? Give feedback.
-
I decided to just use parameters for the non-sensitive values. Here is the setup I went with:
|
Beta Was this translation helpful? Give feedback.
I decided to just use parameters for the non-sensitive values. Here is the setup I went with: