Sitecore / docker-tools

Sitecore Docker Tools are utilities which assist Sitecore developers in initializing and running containerized Sitecore environments.
MIT License
27 stars 17 forks source link

Set environment variable values for more than just Docker Compose #1

Closed nickwesselman closed 3 years ago

nickwesselman commented 3 years ago

As a developer, I'd like to use the Set-DockerComposeEnvFileVariable function for other dotenv files, like those used with Next.js, so that I can initialize values for developer environments.

Currently Set-DockerComposeEnvFileVariable only allows files named .env, and has a name that indicates it is only valuable for Docker Compose. Would like to use this function to initialize NODE_EXTRA_CA_CERTS for Next.js as well, e.g.

    Set-EnvFileVariable -Variable "NODE_EXTRA_CA_CERTS" `
         -Value "$(& $mkcert -CAROOT)\rootCA.pem" `
         -Path "$PSScriptRoot\src\rendering\.env.local"

If the function is renamed, the existing name should be retained as well as a pass-through for backward compatibility.

nickwesselman commented 3 years ago

closed with #2

nickwesselman commented 3 years ago

Will close when merged to master