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

Explanation: How to run this in a local server? #21

Closed
34r7h opened this issue Nov 30, 2014 · 9 comments · Fixed by #26
Closed

Explanation: How to run this in a local server? #21

34r7h opened this issue Nov 30, 2014 · 9 comments · Fixed by #26

Comments

@34r7h
Copy link

34r7h commented Nov 30, 2014

How would you run this in your local development environment? atm, I'm littering commits and pushes to Heroku so I'm probably just missing a n00by move. Cheers and thanks for creating this flow.

@theolampert
Copy link

@irthos MAMP/WAMP or Vagrant I guess? I haven't actually tried but I imagine either would work.

@xyu
Copy link
Owner

xyu commented Nov 30, 2014

To be honest because the first dyno in all heroku apps are free I just have a dev app that I push to and test things out with then squash / push the commits to my production WP instance after I'm satisfied.

You may be able to run these dynos locally with Foreman that comes as part of the Heroku Toolbelt however I have not tried that yet. There's also a request to build this into a Docker file that can be run locally as well (#4) but I have not had much time to work on that.

@dmtintner
Copy link
Contributor

Ive been messing with a local installation of this and keep getting stuck on composer not finding hhvm, if anyone has any ideas about that I would really appreciate it

@xyu
Copy link
Owner

xyu commented Dec 13, 2014

You can have composer skip the hhvm platform dependency locally (#20):

$ composer update --ignore-platform-reqs

@dmtintner
Copy link
Contributor

Awesome, so for anyone else coming here, here's how I did it:

  1. Run composer
    $ composer update --ignore-platform-reqs (I had a problem finding the jetpack repo so needed to remove that from composer.json)
  2. download the heroku config plugin:
    $ heroku plugins:install git://github.com/ddollar/heroku-config.git
  3. pull heroku config variables
    heroku config:pull --overwrite --interactive
  4. change the database url in .env file to match those of your local host
  5. run mamp and set the root web server director to public.built

@xyu
Copy link
Owner

xyu commented Dec 15, 2014

Awesome, thanks for documenting that @dmtintner. Would you mind adding a section to the readme with that into and doing a pull request?

Thanks!

@dmtintner
Copy link
Contributor

@xyu will do, just want to finalize the process to something general for everyone and then will put it there.

The last thing that I have that is still not perfect is I need to run composer install every time I change something in the public directory in order to view it locally. I'm thinking a grunt watch task that copies changes made in the public directory to the public.built could solve this. Any other thoughts?

@xyu
Copy link
Owner

xyu commented Dec 22, 2014

I'm not sure what the best way to go about this, perhaps the best way to go about this is to build a vagrant instance so that everything is self-contained. It will not be a perfect sandbox but could be made much closer to Heroku then standard MAMP.

As for recursively copying, I don't think it's a great solution because what would happen if we remove a file from /public on the local install that have already been copied over to /public.built? We could instead tweak the build process to create a symlink tree which can be used in a grunt task to get around needing to rebuild using composer. (This will be a bit faster then pure composer but I'm not sure if it's worth the extra complexity.)

@xyu
Copy link
Owner

xyu commented Dec 28, 2014

I'm starting a branch to build a vagrant instance for running this locally:

https://github.com/xyu/heroku-wp/compare/vagrant

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

Successfully merging a pull request may close this issue.

4 participants