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
Deploy to Heroku from Circle CI upon updates to a given branch #642
base: dev
Are you sure you want to change the base?
Conversation
…move Procfile and server.sh
This also adds a A few things from this PR should probably land in the README or a deployment page on the wiki. |
BTW, although I believe the deploy to heroku is working just fine, there are issues with my test app on Heroku, possibly due to missing config variables. Currently:
@willzeng (or others) can you post a list of the |
Is this what you need? GRAPHENEDB_URL |
Yes, perfect, thanks @davidfurlong |
The PAPERTRAIL one shouldn't be necessary IIRC |
@willzeng when you have a chance, try out this PR on your test heroku app... |
Just as a #TODO note we should probably make it so that if you deploy to heroku without the correct config variables set then it prompts you for them (or at least shows a useful error before crashing). So I also thought I set up the config variable correctly on the test heroku, but it is crashing with the same error you had before @harlantwood.
What was the change to fix? |
Agreed, I like friendly error messages, I'd be happy with just raising the right error, as anyone deploying should be able to check the logs, eg:
I haven't found the fix for the error we both hit yet @willzeng... Not sure where the error is originating from, as I think the coffee line numbers in my stack trace are bogus (likely from the compiled JS). Can you see the source of the error? |
|
Sweet! I tried upgrading to coffee ~1.9.2 and the errors went away; the app now deploys successfully for me. I've added this to the pull request. @willzeng can you confirm that this branch now deploys and the app starts successfully for you, and seems to work well? |
App is working locally and starts when depoyed to the test. Right now it seems to fail to find the .css files on the heroku deploy.
Will take a look at why now. |
Right so this was because I forgot to switch over the pages to load from the newly built css and js files. If we do that though, things don't exactly line up so well. Here's the result of trying out Looks like the minifying is affecting the styling somewhere. |
I can look at it, but its most likely the ordering of the css rules that it's affecting.. additionally not all pages include all the css files. Ideally we would have separate css files, each minified. Otherwise I can make the different stylesheets compatible with one another, so that minifying and including the lot on each page works. |
What would seem to make the most sense is to have one minified .css file for the pages (login, logout, index, signup, userpage etc.) and another minified .css file for the actually application. Note that at present I think we just intended the main-built.css to go with |
Ideally (performance wise) we compile a minified version for each page. S.t. each page only loads 1 css file and only has rules which apply to that page |
If you want to do it that way then go ahead. Just having the two files On Thu, May 21, 2015 at 1:02 PM David Furlong notifications@github.com
|
Option 1:
Option 2:
As for performance differences, I think Option 1 may be preferable for the size of the stylesheets we currently have (for performance and convenience) |
Agreed. Have given this its own issue for discussion #644 We'll want to resolve this before merging this PR. |
Hm, do you still want to make this happen @willzeng or @davidfurlong? |
I'm working on the css bit in a branch, I can try and get it done today |
Awesome! Just checking in. |
+1 On Fri, Jun 5, 2015, 16:13 Harlan T Wood notifications@github.com wrote:
|
see #647 apologies for the delay |
Awesome :) |
Can this be merged? @davidfurlong @willzeng |
This PR pushes off the app compilation to a CI server, in this case Circle CI (free for open source projects). When you push to a branch of your choice, your code will be deployed to your heroku app. Later, when we add tests to CI, it will only deploy if tests pass.
To use:
production
ordeploy
)HEROKU_APP
, with the value of your Heroku app name to deploy toNow when you push to your branch, CI will:
bin/compile
, precompiling assetsNote that this commit of compiled assets only exists on CI and on Heroku, not on a dev machine, and not on github. This keeps git history free of the noise of generated commits.
As an example, here is Circle CI running this code, and deploying any changes to the
production
branch to my test cograph heroku instance: -- expand thebin/deploy
section to see the compilation and deploy to heroku.Note that this PR obviates #639.