Skip to content
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

feat: add --env=production flag to node ace generate:key #4725

Closed

Conversation

NathaelB
Copy link

❓ Type of change

  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This pull request introduces a new --env=production flag to the node ace generate:key command.

Key Changes:

  • When the commande is run with the --end=production flag, the APP_KEY in .env.example is cleared (set to an empty value).
  • Simultaneously, the APP_KEY in the .env file is updated with a new, randomly generated key, ensuring the correct key for the production environment is set.

Why is this change required?
This enhancement simplifies key management for production environments by automatically clearing the APP_KEY in .env.example, reducing the risk of accidentally committing sensitive keys. It also ensures that a new key is generated and set directly in .env without manual intervention.

@RomainLanz
Copy link
Member

Hey! πŸ‘‹πŸ»

Thanks for the PR! This change has already been addressed in #4722, and I don't think we need a flag to toggle copying the value in the example file.

@RomainLanz RomainLanz closed this Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants