easy-deploy-bundle icon indicating copy to clipboard operation
easy-deploy-bundle copied to clipboard

Script @auto-scripts was called via post-install-cmd

Open infografik opened this issue 5 years ago • 8 comments

Code

$ ./bin/console deploy -v [...] Copying the updated code to the new release directory [user@domain] Executing command: (export APP_ENV=prod; cd /dir/releases/20190919133916 && cp -RPp /dir/repo/* /dir/releases/20190919133916) ----- START ----- Here is mistake: cp -RPp /dir/repo/* /dir/releases/20190919133916) The * character does not copy files starting with a dot. Please add: && cp -R /dir/repo/.e* /dir/releases/20190919133916) && cp -R /dir/repo/.g* /dir/releases/20190919133916) Only .* cannot be added due to the presence of '..' in the folder. ----- STOP ----- [...] Installing Composer dependencies [user@domain] Executing command: (export APP_ENV=prod; cd /dir/releases/20190919133916 && /usr/local/bin/composer install --no-dev --prefer-dist --no-interaction --quiet) | err :: Script @auto-scripts was called via post-install-cmd [ERROR] Cancelling the deployment and reverting the changes [...] In Process.php line 256: [Symfony\Component\Process\Exception\ProcessFailedException] The command "ssh -A user@domain '(export APP_ENV=prod; cd /dir/releases/20190919133916 && /usr/local/bin/composer install --no-dev --prefer-dist --no-interaction --quiet)'" failed. Exit Code: 255(Unknown error) [...] Error Output: ================ Script @auto-scripts was called via post-install-cmd [...]

Error reason

In /dir/releases/201909133916: assets composer.json config package.json public symfony.lock tests var webpack.config.js bin composer.lock package-lock.json phpunit.xml.dist src templates translations vendor yarn.lock

There are no files starting with a dot (files are present in /dir/releases/20190919133916): .env .env-test .git .gitignore

infografik avatar Sep 19 '19 13:09 infografik

Same issue here

felixprojekt avatar Oct 13 '19 10:10 felixprojekt

please fix it!

lcavero avatar Nov 01 '19 19:11 lcavero

Any News?

alzedd avatar May 24 '20 21:05 alzedd

I solve it adding this lines in deploy.php

public function beforePreparing() { $this->runRemote('cp {{ deploy_dir }}/repo/.env {{ project_dir }}/.env'); $this->runRemote('cp {{ deploy_dir }}/repo/.env.development {{ project_dir }}/.env.development'); }

lcavero avatar May 25 '20 08:05 lcavero

while I was waiting for a fix to this issue I put my .env file in the shared folder, which I think it's the best thing to do in order to hide sensitive data such as database coordinates and so on

alzedd avatar May 25 '20 15:05 alzedd

while I was waiting for a fix to this issue I put my .env file in the shared folder, which I think it's the best thing to do in order to hide sensitive data such as database coordinates and so on

But if the .env is a breaking change, rolling back will become another issue i think.

fd6130 avatar Nov 15 '21 08:11 fd6130

salut

ciscolybon avatar Apr 29 '22 08:04 ciscolybon

you should make the .env file and set APP_ENV=prod after that run

composer dump-env prod

then run :

composer install --no-dev --optimize-autoloader

adeltby avatar Mar 10 '23 21:03 adeltby