Skip to content

Commit

Permalink
Generate app secret
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas De Keukelaere committed Dec 3, 2024
1 parent fdd076f commit ac02acc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Skeleton/PostCreateProject.php
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,14 @@ private static function reconfigureApplication(Event $event): void
);
file_put_contents($projectDir . '/.env', $content);

$io->notice('→ Setup .env.local');
$secret = sodium_bin2hex(random_bytes(SODIUM_CRYPTO_SECRETBOX_KEYBYTES));
$content = <<<EOF
APP_ENV=dev
APP_SECRET="$secret"
EOF;
file_put_contents($projectDir . '/.env.local', $content);

$io->notice('→ Reconfigure docker-compose.yml');
$content = file_get_contents($projectDir . '/docker-compose.yml');
// remove doctrine/doctrine-bundle configuration
Expand Down

0 comments on commit ac02acc

Please sign in to comment.