I have a project based on on symfony 5 and webpack-encore.
I run multiple instances of the project in production, with different contents. I create a docker image and run many containers off the same image, setting the content via ENV variables that typically configure the database name. No
.env.* files involved, just RAM-based ENV vars.
The stylesheet is identical for all the clones. But now I would like to "tune" the base colors of the SASS from which all the color palette is derived from an ENV var.
styles/app.scss I do now have this line:
$primary: darken(#428bca, 20%);
- How could I make
#428bcato depend on the runtime docker environment variable that I set when running the container?
- How can I call an env-var value from the .scss?
- After changing it, is it enough to run only
yarn encore productionagain? Or do I have to run the
php bin/console cache:clearbefore running the
Source: Symfony Questions
Was this helpful?
0 / 0