Skip to content

Commit 71d3f32

Browse files
authored
[SHOPWARE] Fix world readable var/cache directory (#4228)
* Copy .env files into build directory Added functionality to copy .env files during build process so that we have sane defaults for APP_ENV and APP_DEBUG * Updated docs by running bin/docgen
1 parent 7bdc3f7 commit 71d3f32

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

docs/recipe/shopware.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,15 +301,15 @@ This task is group task which contains next tasks:
301301

302302

303303
### sw-build-without-db\:build {#sw-build-without-db-build}
304-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/shopware.php#L193)
304+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/shopware.php#L197)
305305

306306

307307

308308

309309

310310

311311
### sw-build-without-db {#sw-build-without-db}
312-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/shopware.php#L197)
312+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/shopware.php#L201)
313313

314314

315315

recipe/shopware.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,10 @@ function getPlugins(): array
181181
if (!test('[ -d {{current_path}} ]')) {
182182
return;
183183
}
184+
// Copy .env files into build directory so we don't default to APP_ENV=dev and APP_DEBUG=1 during build
185+
download("{{current_path}}/", "./", [
186+
"options" => ["--copy-links", "--include=.env*", "--exclude=*"],
187+
]);
184188
within('{{current_path}}', function () {
185189
run('{{bin/php}} ./bin/console bundle:dump');
186190
download('{{current_path}}/var/plugins.json', './var/');

0 commit comments

Comments
 (0)