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

Phoenix support #46

Closed
HashNuke opened this issue Jun 28, 2015 · 2 comments
Closed

Phoenix support #46

HashNuke opened this issue Jun 28, 2015 · 2 comments

Comments

@HashNuke
Copy link
Owner

grep for the string "{:phoenix," in mix.exs and do the following if Phoenix is detected

1.) use appropriate default process type (mix phoenix.server) in bin/release script if Phoenix is detected

We can expand to other frameworks later if required.

2.) compile assets before compiling app

Phoenix uses brunch. If we detect a brunch config, then we could run brunch build --production. But I would vote for requiring users to have an npm build task instead and running something like "npm run build --production". This way it's tooling independent.

3.) use mix phoenix.digest as post-compile hook (if post_compile hook is specifically mentioned in buildpack config, then that must be used instead)
4.) use a database addon in bin/release

This is assuming almost all Phoenix apps use a database.

\cc: @ericmj

@HashNuke
Copy link
Owner Author

Right now this is how I just deployed a Phoenix app:

1.) Set "postinstall" script in package.json to run "brunch build --production"
2.) Set post compile hook in buildpack config to run mix phoenix.digest
3.) Add nodejs buildpack heroku buildpacks:add --index 1 https://github.com/heroku/heroku-buildpack-nodejs

And push to Heroku to deploy

@HashNuke
Copy link
Owner Author

Found this https://github.com/gjaldon/phoenix-static-buildpack. Closing this issue.

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

1 participant