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

Deployment for newly generated project does not work on heroku #180

Closed
tomjadams opened this issue Nov 20, 2014 · 3 comments

Comments

@tomjadams
Copy link
Contributor

commented Nov 20, 2014

The included deployment (well, the assembly plugin) does not work against heroku. In short, heroku expects to call stage and the shipped plugin uses assembly:

I made a few changes to get it working:

  1. Added the native packager plugin to project/plugins.sbt

    addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "0.8.0-RC1")
    
  2. Removed the assembly_plugin.sbt file.

  3. Added the necessary references to build.sbt

    import NativePackagerKeys._
    packageArchetype.java_application
    
  4. Changed procfile as follows:

    web: target/universal/stage/bin/<appname> -Dcom.twitter.finatra.config.env=$ENV -Dcom.twitter.finatra.config.adminPort=$ADMIN_PORT -Dcom.twitter.finatra.config.port=:$PORT
    

Notes.

  1. I added the $ADMIN_PORT environment variable so I can run formate start on the local command line to have the app boot via the Procfile.

  2. I added $ENV for the same reason, so that the development or whatever environment can be passed locally while still using the production style startup process.

  3. These require a .env file with those parameters defined as follows:

    PORT=7070
    ADMIN_PORT=:9990
    ENV=development
    
@tomjadams

This comment has been minimized.

Copy link
Contributor Author

commented Nov 21, 2014

I should note, I'd be happy to submit a PR if you think these are worthwhile changes to have.

@tomjadams

This comment has been minimized.

Copy link
Contributor Author

commented Nov 24, 2014

PR sent #181

I've generated a test project & tested a fresh deployment to heroku.

@cacoco

This comment has been minimized.

Copy link
Member

commented Jun 3, 2015

@cacoco cacoco closed this Jun 3, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.