Giter Club home page Giter Club logo

Comments (10)

peterjmit avatar peterjmit commented on August 24, 2024

Might have to look at doing something like capistrano/ruby does here https://github.com/capistrano/rails/blob/master/lib/capistrano/tasks/set_rails_env.rake

from symfony.

sandermarechal avatar sandermarechal commented on August 24, 2024

Yes, that would be perfect IMHO

from symfony.

e42sh avatar e42sh commented on August 24, 2024

👍

from symfony.

leevigraham avatar leevigraham commented on August 24, 2024

@sandermarechal did you find a workaround for this? // @peterjmit

from symfony.

leevigraham avatar leevigraham commented on August 24, 2024

Following on from the issue and comments the solution I implemented was to add the following to the bottom of deploy.rb:

namespace :deploy do
  task :set_symfony_env do
    fetch(:default_env).merge!(symfony_env: fetch(:symfony_env))
  end
end

Capistrano::DSL.stages.each do |stage|
  after stage, 'deploy:set_symfony_env'
end

from symfony.

jurgenweber avatar jurgenweber commented on August 24, 2024

I am getting:

DEBUG [0230d294] Command: cd /var/www/foodpanda-new/production/va/releases/20140610135412 && ( SYMFONY_ENV=prod /usr/bin/env composer install --no-dev --prefer-dist --no-interaction --quiet --optimize-autoloader )
DEBUG [0230d294] /usr/bin/env: composer
DEBUG [0230d294] : No such file or directory

capistrano (3.2.1, 2.15.5)
capistrano-composer (0.0.4)
capistrano-file-permissions (0.1.0, 0.0.1)
capistrano-symfony (0.1.0)

I am migration from cap 2 to 3. Thanks

from symfony.

peterjmit avatar peterjmit commented on August 24, 2024

Hi @jurgenweber this seems like an issue un-related to this one? You will need composer installed on your machine before using this library (see documentation here https://github.com/capistrano/composer)

from symfony.

jurgenweber avatar jurgenweber commented on August 24, 2024

Yeah, I did notice that a little while later on. Thanks for confirmation. Sorry.

from symfony.

jeremylivingston avatar jeremylivingston commented on August 24, 2024

Are there any updates on when this fix will be merged? I currently cannot find a way to deploy my Symfony application outside of production.

I have the following line in deploy.rb: set :symfony_env, "staging"

The following command is run when the cache:warmup step is reached:

Command: cd /var/www/deploy/releases/20140724205523 && ( SYMFONY_ENV=prod /usr/bin/env php app/console cache:warmup  --no-debug )

[InvalidArgumentException]                                                                              
The file "/var/www/deploy/releases/20140724205523/app/config/config_prod.yml" does not exist.  

As you can see, the command is provided the wrong SYMFONY_ENV variable and also no --env=staging variable. Does the symfony_env parameter actually work?

Any insight is appreciated. Thank you!

from symfony.

peterjmit avatar peterjmit commented on August 24, 2024

resolved by #20

from symfony.

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.