Git Product home page Git Product logo

Comments (3)

joelclouddistrict avatar joelclouddistrict commented on May 20, 2024

I am having the same issue:

===> Initializing configuration
---> Processing the configuration options of the deployer class
binDir                     : app
cacheDir                   : app/cache
composerInstallFlags       : --no-dev --prefer-dist --no-interaction --quiet
composerOptimizeFlags      : --optimize
configDir                  : app/config
consoleBinaryPath          : 
controllersToRemove        : ["web/app_dev.php"]
deployDir                  : /home/deploy/app
dumpAsseticAssets          : true
installWebAssets           : true
keepReleases               : 5
localProjectDir            : /application
logDir                     : app/logs
permissionGroup            : 
permissionMethod           : chmod
permissionMode             : 0777
permissionUser             : 
remoteComposerBinaryPath   : /usr/local/bin/composer
remotePhpBinaryPath        : php
repositoryBranch           : master
repositoryUrl              : xxxxx
resetOpCacheFor            : 
servers                    : xxxxx
sharedDirs                 : ["app/logs/"]
sharedFiles                : ["app/config/parameters.yml"]
srcDir                     : src
symfonyEnvironment         : prod
templatesDir               : app/Resources/views
updateRemoteComposerBinary : false
useSshAgentForwarding      : true
warmupCache                : true
webDir                     : web
writableDirs               : ["app/cache/","app/logs/"]
Preparing app
Creating cache directory
[xxxxx(remote)] Executing command: (export SYMFONY_ENV=prod; cd /home/deploy/app/releases/20171023104827 && if [ -d /home/deploy/app/releases/20171023104827/app/cache ]; then rm -rf /home/deploy/app/releases/20171023104827/app/cache; fi; mkdir -p /home/deploy/app/releases/20171023104827/app/cache)
Creating log directory
[xxxxx(remote)] Executing command: (export SYMFONY_ENV=prod; cd /home/deploy/app/releases/20171023104827 && if [ -d /home/deploy/app/releases/20171023104827/app/logs ] ; then rm -rf /home/deploy/app/releases/20171023104827/app/logs; fi; mkdir -p /home/deploy/app/releases/20171023104827/app/logs)
Creating symlinks for shared directories
[xxxxx(remote)] Executing command: (export SYMFONY_ENV=prod; cd /home/deploy/app/releases/20171023104827 && mkdir -p /home/deploy/app/shared/app/logs/)
[xxxxx(remote)] Executing command: (export SYMFONY_ENV=prod; cd /home/deploy/app/releases/20171023104827 && if [ -d /home/deploy/app/releases/20171023104827/app/logs/ ] ; then rm -rf /home/deploy/app/releases/20171023104827/app/logs/; fi)
[xxxxx(remote)] Executing command: (export SYMFONY_ENV=prod; cd /home/deploy/app/releases/20171023104827 && ln -nfs /home/deploy/app/shared/app/logs/ /home/deploy/app/releases/20171023104827/app/logs/)
| err :: ln: el objetivo «/home/deploy/app/releases/20171023104827/app/logs/» no es un directorio: No existe el archivo o el directorio
[ERROR] Cancelling the deployment and reverting the changes
A log file with all the error details has been generated in /application/app/logs/deploy_dev.log

The remote host is an Ubuntu 14.04.5

from easy-deploy-bundle.

patrick-mota avatar patrick-mota commented on May 20, 2024

I did a fix.
Pull request

This problem happens only if you use Symfony 2.x

Here is the detail to find the fix I did:
The problem is in \EasyCorp\Bundle\EasyDeployBundle\Deployer\DefaultDeployer
doCreateShareDirs function
Line 285 you do:
$this->runRemote(sprintf('if [ -d {{ project_dir }}/%s ] ; then rm -rf {{ project_dir }}/%s; fi', $sharedDir, $sharedDir));

The problem is you remove the app/logs/ folder so we can't do the ln -nfs right after.
I just added right after this line (for testing purposes only)
$this->runRemote('mkdir -p app/logs');
and it seems to fix the issue since the deploy continue until another error (php memory limit because of composer so completly not related).

Another way to fix the issue is to remove the extra slash when you create the folder app/logs.

root@cc47a114022f:/usr/src/myapp2/app# ln -nfs /usr/src/myapp/app/logs/ /usr/src/myapp2/app/logs/
ln: target '/usr/src/myapp2/app/logs/' is not a directory: No such file or directory
root@cc47a114022f:/usr/src/myapp2/app# ln -nfs /usr/src/myapp/app/logs/ /usr/src/myapp2/app/logs

from easy-deploy-bundle.

javiereguiluz avatar javiereguiluz commented on May 20, 2024

Fixed by #37.

from easy-deploy-bundle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.