elcodi / bamboo

Meet Bamboo, an e-commerce project built on top of Elcodi and Symfony. Give us a star to support our project :)
http://bamboo.elcodi.com
MIT License
198 stars 44 forks source link

Added Heroku configuration #608

Closed EmanueleMinotto closed 8 years ago

EmanueleMinotto commented 8 years ago

Closes https://github.com/elcodi/bamboo/issues/607

To test this PR please try: https://dashboard.heroku.com/new?template=https%3A%2F%2Fgithub.com%2FEmanueleMinotto%2Fbamboo%2Ftree%2Fheroku-deploy

EmanueleMinotto commented 8 years ago

Current problems are:

  1. To install the gd extension Heroku requires to add an "ext-gd": "*" to the composer.json
  2. without loading the fixtures, the store can't be used
  3. the fixtures require phpunit/phpunit, that theorically should be used only on dev
  4. the free services used (ClearDB and SendGrid) create some environment variables like the CLEARDB_DATABASE_URL that's an URI and to load them an app/config/heroku.php is the simplest way
  5. app.json is using http://elcodi.io/img/icon/apple-icon-180x180.png, is there a canonical URL?
mickaelandrieu commented 8 years ago

Hi @EmanueleMinotto, for the 1/ you should update the composer.json, it's a good practice and we shouldn't assume anything about the PHP configuration :)

EmanueleMinotto commented 8 years ago

@mickaelandrieu I agree and updated the composer.json, but I'm not fully sure because this dependency could be optional if the final developer wants to use the imagemagick adapter

mmoreram commented 8 years ago

php-gd shouldn't be required, but suggested. As points @EmanueleMinotto, if ImageMagick is the used adapter, then php-gd is not a requirement anymore.

mickaelandrieu commented 8 years ago

maybe, but composer is unable to say "one of them is required: gd or imagemagick"

mmoreram commented 8 years ago

Some changes here @EmanueleMinotto :

mmoreram commented 8 years ago

@mickaelandrieu a requirement is a requirement. Means that, without GD, you cannot make it work.

In a servers without GD, or even the possibility of having it, then we're done with it, and is not a possibility.

mmoreram commented 8 years ago

@mickaelandrieu BTW, composer is a dependency resolver, not a needs checker ;)

mickaelandrieu commented 8 years ago

@mmoreram I know, but if you remove gd as an requirement, the issue still persist with Heroku, but also with any environement that don't have the gd or imagemagick PHP extension. What do you suggest to address this issue ?

EmanueleMinotto commented 8 years ago

@mickaelandrieu I'm still investigating, anyway seems that the only option available is creating a custom buildpack

mmoreram commented 8 years ago

Things to check:

EmanueleMinotto commented 8 years ago

Added the right migrations, but this is still a work in progress because there are some problems like images and some pages show an exception.

mmoreram commented 8 years ago

Closing in favor of #620