1

Im trying to deploy a symfony2 project with capifony.

I get the following error:

--> Updating code base with rsync_with_remote_cache strategy
--> Creating cache directory................................✔
--> Creating symlinks for shared directories................✔
--> Creating symlinks for shared files......................✔
--> Normalizing asset timestamps............................✔
--> Downloading Composer....................................✔
--> Updating Composer dependencies..........................✔
--> Building bootstrap file.................................✔
--> Updating Composer.......................................✔
--> Dumping an optimized autoloader.........................✔
--> Installing bundle's assets..............................✘
*** [err :: server.de] 
*** [err :: server.de] 
*** [err :: server.de] 
*** [err :: server.de] [Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException]
*** [err :: server.de] You have requested a non-existent parameter "secret".
*** [err :: server.de] 
*** [err :: server.de] 
*** [err :: server.de] 
*** [deploy:update_code] rolling back
failed: "sh -c 'sh -c '\\''cd /var/www/server.de/releases/20130111092102 && php app/console assets:install web --env=prod'\\'''" on server.de

My deploy.rb

set :application, "Testproject"
set :domain,      "server.de"
set :deploy_to,   "/var/www/server.de/"
set :app_path,    "app"
set :user,        "username"
ssh_options[:forward_agent] = true

set :repository,  "file:///home/kai/webprojects/testproject/.git"
set :scm,         :git
set   :deploy_via,    :rsync_with_remote_cache
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `subversion`, `mercurial`, `perforce`, or `none`

set :model_manager, "doctrine"
# Or: `propel`

role :web,        domain                         # Your HTTP server, Apache/etc
role :app,        domain                         # This may be the same as your `Web` server
role :db,         domain, :primary => true       # This is where Symfony2 migrations will run

set :use_sudo,          false

set  :keep_releases,  3
set  :update_vendors, true
set  :shared_files,      ["app/config/parameters.yml"]
set  :shared_children,     [app_path + "/logs", web_path + "/uploads", "vendor"]
set  :use_composer, true

Manually running: php app/console assets:install web --env=prod works without errors

Edit: Due to the Comment from PéCé because of the secret Parameter: Here is my app/config/parameters.yml

parameters:
    database_driver:   pdo_mysql
    database_host:     127.0.0.1
    database_port:     ~
    database_name:     dbName
    database_user:     dbName
    database_password: secretPassword

    mailer_transport:  smtp
    mailer_host:       localhost
    mailer_user:       ~
    mailer_password:   ~

    locale:            de
    secret:            SomeSecret4465466

    beryllium_cache.client.servers: { "localhost": 11211 }

Thanks for your Ideas

pixelsucht
  • 228
  • 2
  • 8
  • I don't know Capifony but the message tells that there is no definition of parameter "secret" (the common salt for passwords) in app/config/parameters.ini – AlterPHP Jan 11 '13 at 10:40
  • Yes. Thanks for pointing that out. I forgot to mention that the secret parameter in app/config/parameters.ini is set. I will edit the Question. – pixelsucht Jan 11 '13 at 11:19
  • Hm. The secret parameter is default for Symfony2. But somehow the Definition is not set in my case... Hmmm. – pixelsucht Jan 11 '13 at 11:26

1 Answers1

1

I found the answer. It is clearly written in the capifony documentation:

The final step is to configure your app/config/parameters.yml file. The best way to do this is to create this file in shared folder on server manually:

ssh your_deploy_server
mkdir -p /var/www/my-app.com/shared/app/config
vim /var/www/my-app.com/shared/app/config/parameters.yml

Once your parameters.yml file is correctly configured, you should be able to test your deployed application. On every subsequent deploy, that same app/config/parameters.yml file will be symlinked into your application, meaning you only need to configure after the initial deploy.

Thats is :)

pixelsucht
  • 228
  • 2
  • 8