1

I have a problem with assetic:dump. I use combination css/less files and js/coffeescript files. I need run assetic:dump than before cap deploy is performed, because a target server has not installed node js and coffeescript. If I use set :dump_assetic_assets, true in my deploy.rb, the capifony run assetic:dump after deploy on target server. It throws error during compiling coffeescript.

I don't know how to solve this problem. I think It was mistake to choose Symfony 2 for a my project. All develop are some problems. I thought that deploy is base thing, but It is big the problem in Symfony 2.

#1 UPDATE

set :application, "project"
set :domain,      "10.0.0.61"
set :deploy_to,   "/var/www/html/project"
set :app_path,    "app"
set :user,        "kunesd"

#ssh_options[:forward_agent] = true
#ssh_options[:port] = "22"
set :branch, "master"

# set :symfony_env_prod, "dev"

set   :scm,           :git
set   :repository,    "d:\\Prace\\Project\\web\\os-project\\"
set   :deploy_via,    :copy
# 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, :primary => true       # This may be the same as your `Web` server

# Composer settings
# set :use_composer, true
#set :use_composer_tmp, true
# set :update_vendors, false
#set :vendors_mode, "install"

# General settings
#set :shared_files,    ["app/config/parameters.yml"]
#set :shared_children, [app_path + "/logs", web_path + "/uploads"]
set :keep_releases,  3
set :use_sudo, false
#set :writable_dirs,     [app_path + "/logs", app_path + "/cache", web_path + "/uploads"]
#set :webserver_user,    "www-data"
#set :permission_method, :acl
#set :use_set_permissions, true

# Be more verbose by uncommenting the following line
 logger.level = Logger::TRACE

Thank you for your answers.

positive
  • 151
  • 2
  • 12

1 Answers1

0

I think you have two options:

  1. Create a custom task for the capifony, which will be executed before deploy command
  2. Create local script which will first run you task for assetic dump and then run capifony standard command.
Pawel
  • 1,672
  • 2
  • 18
  • 24
  • Hi, thank you. Could you show example 2. option me, pls? I have to create script with `php app/console assetic:dump` or `php app/console assetic:dump --env=prod` ? And then I have to run `cap deploy` ? – positive Jan 21 '15 at 16:37
  • I don't have an example, beacuse i minify stuff on server (during deploy). Second thing is, which strategy do you use for capifony (full copy, git .. ) ? – Pawel Jan 21 '15 at 16:45
  • Look at my #1 UDPATE. It shows all setting. I use local repository then capifony copy project to the server. – positive Jan 21 '15 at 17:15