Skip to content

Make Installer handle APP_KEY generation#1138

Closed
rmartinoscar wants to merge 1 commit intomainfrom
add/InstallerKeyGenerate
Closed

Make Installer handle APP_KEY generation#1138
rmartinoscar wants to merge 1 commit intomainfrom
add/InstallerKeyGenerate

Conversation

@rmartinoscar
Copy link
Copy Markdown
Member

@rmartinoscar rmartinoscar commented Mar 21, 2025

Needs #1073

Copy link
Copy Markdown
Member

@Boy132 Boy132 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p:environment:setup is not only generating the app key but also copies the example .env file.
Both of these steps need to happen before the installer part.

@rmartinoscar
Copy link
Copy Markdown
Member Author

p:environment:setup is not only generating the app key but also copies the example .env file. Both of these steps need to happen before the installer part.

#1138

panel/composer.json

Lines 84 to 86 in 4ae0523

"post-install-cmd": [
"php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],

@notAreYouScared
Copy link
Copy Markdown
Member

p:environment:setup is not only generating the app key but also copies the example .env file. Both of these steps need to happen before the installer part.

#1138

panel/composer.json

Lines 84 to 86 in 4ae0523

"post-install-cmd": [
"php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],

That only fixes copying the env. Not generating the app key, which is still needed

@rmartinoscar
Copy link
Copy Markdown
Member Author

That only fixes copying the env. Not generating the app key, which is still needed

Oops it only sets an empty one when running from console should i remove this check or cancel pelican-dev/panel#1138 & pelican-dev/docs#123 PR ?

if ($app->runningInConsole() && empty(config('app.key'))) {
$config->set('app.key', '');
}

@Boy132
Copy link
Copy Markdown
Member

Boy132 commented Mar 22, 2025

That only fixes copying the env. Not generating the app key, which is still needed

Oops it only sets an empty one when running from console should i remove this check or cancel pelican-dev/panel#1138 & pelican-dev/docs#123 PR ?

if ($app->runningInConsole() && empty(config('app.key'))) {
$config->set('app.key', '');
}

Close the PRs.

@github-actions github-actions Bot locked and limited conversation to collaborators Mar 22, 2025
@Boy132 Boy132 deleted the add/InstallerKeyGenerate branch April 4, 2025 10:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants