Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Equivalent for Local Development? #79

Open
rayrigam opened this issue Jan 28, 2014 · 1 comment
Open

Equivalent for Local Development? #79

rayrigam opened this issue Jan 28, 2014 · 1 comment

Comments

@rayrigam
Copy link

I'm wondering whether someone has worked out a way to easily set up a local machine for development with an equivalent to this Heroku-PHP Buildpack?

I tried using Vagrant with the following Heroku Celadon Cedar Virtual Box: http://dl.dropbox.com/u/1906634/heroku.box
Then set up a bootstrap.sh file with all the shell commands needed to install PHP, Nginx, and other. However, I have trouble installing php as I have not found a pre-compiled PHP 5.5 version for Ubuntu 10.04 (I cannot simply run sudo apt-get install php5 as that would install an older PHP version). I tried using the PHP from http://www.christophh.net/php-build/ but I then run into trouble

configure: error: mcrypt.h not found. Please reinstall libmcrypt.

when building it with php-build -i development --pear 5.5.8 ~/local/php/5.5.8. I can solve that with sudo apt-get install libmcrypt-dev but then I have to tell the system where to find PHP, set php5-fpm and other extensions... Then I have to make sure configuration files are equivalent to those in this Buildpack.

I could probably figure it out with some time, but I was wondering whether there is an easier way (or tutorial) already available?

@crisward
Copy link

I used this in development using dokku - https://github.com/progrium/dokku
I also used guest additions in vagrant to share the site to a local share. You can then edit code without re-pushing all the time. I've found having the git repo contain a subfolder, then share this subfolder works best. Sorry if this isn't enough detail to replicate, just know it's possible. Also a good gotcha to avoid with this setup is caching, disable opache. See my example composer.json below

{
    "require": {
      "php": ">=5.4.0",
      "ohmy/auth": "*"
    },
    "extra": {
      "heroku": {
      "document-root": "public_html",
      "index-document": "index.php",
      "nginx-includes":["nginx.conf"],
      "php-config": [
        "opcache.enable=off"
      ]
    }
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants