-
Notifications
You must be signed in to change notification settings - Fork 641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FR: Ability to store plugin license keys in .env file #4393
Comments
This is possible with the CRAFT_LICENSE_KEY PHP constant. .env: LICENSE_KEY="#########..." web/index.php (after loading define('CRAFT_LICENSE_KEY', getenv('LICENSE_KEY')); |
For the Craft license sure, but I was talking about specific 3rd party plugin licenses. |
Sorry, somehow I missed that! |
Just added the ability to set plugin license keys to environment variables using the |
Fantastic, thank you! |
Small problem with this is that the name of the variable has a max length because the field is cut to the length of a license key |
@jurriaanr Thanks for pointing that out. Just removed the |
For those interested in storing the license key in an environment variable: don't forget to add |
FWIW, it does work already... I'm doing it here for Craft: https://github.com/nystudio107/devmode/blob/develop/cms/bootstrap.php#L23 and here for plugins: https://github.com/nystudio107/devmode/blob/develop/cms/config/project/project.yaml#L144 |
Description
For security reasons, it would be nice to be able to keep my plugin licenses stored in my .env files and out of the
project.yaml
file in my repo. Currently it's only possible to have the license defined explicitly in the project config file.The text was updated successfully, but these errors were encountered: