symfony - Symfony2 deployement with Heroku : Dumping assets -


i'm using heroku deploy symfony2 app default configuration assets not dumped.

i have added composer.json :

... "scripts": {     "post-install-cmd": [         "incenteev\\parameterhandler\\scripthandler::buildparameters",         "sensio\\bundle\\distributionbundle\\composer\\scripthandler::buildbootstrap",         "sensio\\bundle\\distributionbundle\\composer\\scripthandler::clearcache",         "sensio\\bundle\\distributionbundle\\composer\\scripthandler::installassets",         "sensio\\bundle\\distributionbundle\\composer\\scripthandler::installrequirementsfile",         "php app/console --env=prod assetic:dump"     ] }, ... 

is right way ?

in procfile, doesn't work. , :

heroku run php app/console --env=prod assetic:dump 

also doesn't work.

thank you,

ref : https://devcenter.heroku.com/articles/getting-started-with-symfony2

this works me:

  "scripts": {     "post-install-cmd": [       "incenteev\\parameterhandler\\scripthandler::buildparameters",       "sensio\\bundle\\distributionbundle\\composer\\scripthandler::buildbootstrap",       "sensio\\bundle\\distributionbundle\\composer\\scripthandler::clearcache",       "sensio\\bundle\\distributionbundle\\composer\\scripthandler::installassets",       "sensio\\bundle\\distributionbundle\\composer\\scripthandler::installrequirementsfile",       "sensio\\bundle\\distributionbundle\\composer\\scripthandler::removesymfonystandardfiles",       "sensio\\bundle\\distributionbundle\\composer\\scripthandler::preparedeploymenttarget"     ],     "post-update-cmd": [       "incenteev\\parameterhandler\\scripthandler::buildparameters",       "sensio\\bundle\\distributionbundle\\composer\\scripthandler::buildbootstrap",       "sensio\\bundle\\distributionbundle\\composer\\scripthandler::clearcache",       "sensio\\bundle\\distributionbundle\\composer\\scripthandler::installassets",       "sensio\\bundle\\distributionbundle\\composer\\scripthandler::installrequirementsfile",       "sensio\\bundle\\distributionbundle\\composer\\scripthandler::removesymfonystandardfiles",       "sensio\\bundle\\distributionbundle\\composer\\scripthandler::preparedeploymenttarget"     ],     "compile": [       "rm web/app_dev.php",       "php app/console assetic:dump --no-debug"     ]   }, 

notice "compile" section. key name heroku convention.

symfony docs: http://symfony.com/doc/current/cookbook/deployment/heroku.html says can use custom composer command

you not need add --env=prod option should add environment variable in heroku.


Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -