Skip to content
This repository has been archived by the owner on Nov 18, 2017. It is now read-only.

Deploy to heroku #10

Closed
pbrisbin opened this issue Feb 27, 2014 · 5 comments
Closed

Deploy to heroku #10

pbrisbin opened this issue Feb 27, 2014 · 5 comments

Comments

@pbrisbin
Copy link
Contributor

https://github.com/begriffs/heroku-buildpack-ghc

@pbrisbin
Copy link
Contributor Author

Steps taken for carnival-staging that will have to occur again on -production:

  • Create Heroku App
  • Add Postgres Add-on
  • Set buildpack:
$ heroku config:set BUILDPACK_URL="https://github.com/begriffs/heroku-buildpack-ghc.git"
  • Push once and probably blow Heroku's build timeout:
$ git push staging master
  • Build on an anvil server:
$ heroku plugins:install https://github.com/ddollar/heroku-anvil
$ heroku build -r -b https://github.com/begriffs/heroku-buildpack-ghc.git
  • Push finally:
$ git push staging master

@pbrisbin
Copy link
Contributor Author

I have this effectively working in pb-deploy-to-heroku, but I can't get around the build timeout. The anvil instructions in that link don't seem to be making subsequent deploys any faster.

Will investigate next week.

@pbrisbin
Copy link
Contributor Author

OK. So it looks like the buildpack README is just misleading: begriffs/heroku-buildpack-ghc#16

If I'm reading this correctly, it's an open problem that subsequent normal pushes after an Anvil build will not reuse the cache and will likely timeout. But, the Anvil build does actually deploy the app. I was probably not realizing this because I was attempting to deploy a non-master branch.

I'm going to re-run an anvil build with local commits on master and see if that results in a successful deploy. If so, we can just state that Anvil is the way to deploy carnival -- that is, until the above issue is resolved.

@pbrisbin
Copy link
Contributor Author

Update:

After a few tries, I managed to get past the Anvil errors. It required a combination of heroku restart, repeated attempts, and (apparently) waiting some time. I'm not sure if this will be an ongoing issue or not. My understanding is trying to do a normal push and timing out can put the Dyno into a state where an Anvil build will error in this way. Restarting it is required, but sometimes you also have to wait a bit before trying. If that's the case then we should OK now that we know not to attempt a normal push, but to always use Anvil. I'll update the README with this information when the changes are pushed.

That means staging is live now: http://carnival-staging.herokuapp.com/user

I now just need to create a new OAuth App on Learn and set the environment variable for it to start working -- for now, it's falling back to dev credentials which don't work.

@pbrisbin
Copy link
Contributor Author

Closing for #27

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

No branches or pull requests

1 participant