{"id":19834,"date":"2015-05-29T13:26:36","date_gmt":"2015-05-29T07:56:36","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=19834"},"modified":"2017-04-25T09:59:21","modified_gmt":"2017-04-25T04:29:21","slug":"deploying-ratpack-application-on-heroku","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/deploying-ratpack-application-on-heroku\/","title":{"rendered":"Deploying Ratpack Application on Heroku"},"content":{"rendered":"<p>Recently, I was working on a micro-service using Ratpack framework. \u00a0I wanted to deploy it to Heroku. I had tried to find good documentation for deploying on Heroku but couldn&#8217;t find as such.\u00a0After much trial and error, I finally managed to get a working configuration for successful deployment. As Heroku has very good support for Gradle-based projects and just we need to give right configuration details and all would be done. So, Here are the steps for right configuration:<\/p>\n<p><strong style=\"font-size: 20px;\">Artifacts:\u00a0<\/strong>we would need to create some files at root of the project which would contain<\/p>\n<p><em>\u00a0 1. <span style=\"color: #333300;\">system.properties<\/span><\/em>: \u00a0It will let\u00a0Heroku \u00a0know which version of java to be used<\/p>\n<pre>java.runtime.version=1.8<\/pre>\n<p><em>\u00a0 2.<span style=\"color: #333300;\"> settings.gradle<\/span><\/em>:<\/p>\n<pre>rootProject.name = 'project_name'<\/pre>\n<p><em>\u00a0 3. <span style=\"color: #333300;\">Procfile<\/span><\/em>: It would\u00a0let\u00a0Heroku know from where it needs to pick a big fat jar of the project and what command, it needs to execute to run project.<\/p>\n<pre>web: java -jar -Dport=$PORT build\/libs\/project_name-all.jar<\/pre>\n<p><strong style=\"font-size: 20px;\">Edit build.gradle:\u00a0<\/strong>we would need to add a dependency \u00a0in buildscript for buildingfat jar<\/p>\n<pre>buildscript {\r\n    repositories {\r\n        jcenter()\r\n    }\r\n    dependencies {\r\n        classpath \"io.ratpack:ratpack-gradle:0.9.15\"\r\n        classpath \"com.github.jengelman.gradle.plugins:shadow:1.2.1\"\r\n    }\r\n}\r\n\r\n<\/pre>\n<pre>apply plugin: \"io.ratpack.ratpack-groovy\"\r\napply plugin: \"com.github.johnrengelman.shadow\"<\/pre>\n<p>and closure of Task <em>stage<\/em>\u00a0:<\/p>\n<pre>task stage {\r\n    dependsOn shadowJar\r\n}<\/pre>\n<p>This above code will help in generating big fat jar of ratpack application with name project_name-all.jar when Heroku would run &#8220;gradle stage&#8221; task for building the code.<\/p>\n<p>&nbsp;<\/p>\n<p>Just That&#8217;s it&#8230;<br \/>\nNow! We are ready to commit our code to Heroku and deployment done \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently, I was working on a micro-service using Ratpack framework. \u00a0I wanted to deploy it to Heroku. I had tried to find good documentation for deploying on Heroku but couldn&#8217;t find as such.\u00a0After much trial and error, I finally managed to get a working configuration for successful deployment. As Heroku has very good support for [&hellip;]<\/p>\n","protected":false},"author":40,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":3,"footnotes":""},"categories":[1],"tags":[1511,1224,1512],"class_list":["post-19834","post","type-post","status-publish","format-standard","hentry","category-technology","tag-gradle","tag-heroku","tag-ratpack"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"Recently, I was working on a micro-service using Ratpack framework. I wanted to deploy it to Heroku. I had tried to find good documentation for deploying on Heroku but couldn&#039;t find as such. After much trial and error, I finally managed to get a working configuration for successful deployment. As Heroku has very good support for\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Sachin Verma\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.tothenew.com\/blog\/deploying-ratpack-application-on-heroku\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"TO THE NEW BLOG\" \/>\n\t\t<meta property=\"og:type\" content=\"blog\" \/>\n\t\t<meta property=\"og:title\" content=\"Deploying Ratpack Application on Heroku | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"Recently, I was working on a micro-service using Ratpack framework. I wanted to deploy it to Heroku. I had tried to find good documentation for deploying on Heroku but couldn&#039;t find as such. After much trial and error, I finally managed to get a working configuration for successful deployment. As Heroku has very good support for\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.tothenew.com\/blog\/deploying-ratpack-application-on-heroku\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@tothenew\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Deploying Ratpack Application on Heroku | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Recently, I was working on a micro-service using Ratpack framework. I wanted to deploy it to Heroku. I had tried to find good documentation for deploying on Heroku but couldn&#039;t find as such. After much trial and error, I finally managed to get a working configuration for successful deployment. As Heroku has very good support for\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/deploying-ratpack-application-on-heroku\\\/#article\",\"name\":\"Deploying Ratpack Application on Heroku | TO THE NEW Blog\",\"headline\":\"Deploying Ratpack Application on Heroku\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/sachin-verma\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"datePublished\":\"2015-05-29T13:26:36+05:30\",\"dateModified\":\"2017-04-25T09:59:21+05:30\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/deploying-ratpack-application-on-heroku\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/deploying-ratpack-application-on-heroku\\\/#webpage\"},\"articleSection\":\"Technology, gradle, heroku, ratpack\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/deploying-ratpack-application-on-heroku\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"name\":\"Technology\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"position\":2,\"name\":\"Technology\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/deploying-ratpack-application-on-heroku\\\/#listItem\",\"name\":\"Deploying Ratpack Application on Heroku\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/deploying-ratpack-application-on-heroku\\\/#listItem\",\"position\":3,\"name\":\"Deploying Ratpack Application on Heroku\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"name\":\"Technology\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\",\"name\":\"TO THE NEW Blog\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/sachin-verma\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/sachin-verma\\\/\",\"name\":\"Sachin Verma\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/deploying-ratpack-application-on-heroku\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/94829ab955a49dca68aebd5e61c357bc7b22dff3b3c43353fece63ce4831657a?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Sachin Verma\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/deploying-ratpack-application-on-heroku\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/deploying-ratpack-application-on-heroku\\\/\",\"name\":\"Deploying Ratpack Application on Heroku | TO THE NEW Blog\",\"description\":\"Recently, I was working on a micro-service using Ratpack framework. I wanted to deploy it to Heroku. I had tried to find good documentation for deploying on Heroku but couldn't find as such. After much trial and error, I finally managed to get a working configuration for successful deployment. As Heroku has very good support for\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/deploying-ratpack-application-on-heroku\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/sachin-verma\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/sachin-verma\\\/#author\"},\"datePublished\":\"2015-05-29T13:26:36+05:30\",\"dateModified\":\"2017-04-25T09:59:21+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\",\"name\":\"TO THE NEW Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Deploying Ratpack Application on Heroku | TO THE NEW Blog","description":"Recently, I was working on a micro-service using Ratpack framework. I wanted to deploy it to Heroku. I had tried to find good documentation for deploying on Heroku but couldn't find as such. After much trial and error, I finally managed to get a working configuration for successful deployment. As Heroku has very good support for","canonical_url":"https:\/\/www.tothenew.com\/blog\/deploying-ratpack-application-on-heroku\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.tothenew.com\/blog\/deploying-ratpack-application-on-heroku\/#article","name":"Deploying Ratpack Application on Heroku | TO THE NEW Blog","headline":"Deploying Ratpack Application on Heroku","author":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/sachin-verma\/#author"},"publisher":{"@id":"https:\/\/www.tothenew.com\/blog\/#organization"},"datePublished":"2015-05-29T13:26:36+05:30","dateModified":"2017-04-25T09:59:21+05:30","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.tothenew.com\/blog\/deploying-ratpack-application-on-heroku\/#webpage"},"isPartOf":{"@id":"https:\/\/www.tothenew.com\/blog\/deploying-ratpack-application-on-heroku\/#webpage"},"articleSection":"Technology, gradle, heroku, ratpack"},{"@type":"BreadcrumbList","@id":"https:\/\/www.tothenew.com\/blog\/deploying-ratpack-application-on-heroku\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.tothenew.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/technology\/#listItem","name":"Technology"}},{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/technology\/#listItem","position":2,"name":"Technology","item":"https:\/\/www.tothenew.com\/blog\/category\/technology\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/deploying-ratpack-application-on-heroku\/#listItem","name":"Deploying Ratpack Application on Heroku"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/deploying-ratpack-application-on-heroku\/#listItem","position":3,"name":"Deploying Ratpack Application on Heroku","previousItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/technology\/#listItem","name":"Technology"}}]},{"@type":"Organization","@id":"https:\/\/www.tothenew.com\/blog\/#organization","name":"TO THE NEW Blog","url":"https:\/\/www.tothenew.com\/blog\/"},{"@type":"Person","@id":"https:\/\/www.tothenew.com\/blog\/author\/sachin-verma\/#author","url":"https:\/\/www.tothenew.com\/blog\/author\/sachin-verma\/","name":"Sachin Verma","image":{"@type":"ImageObject","@id":"https:\/\/www.tothenew.com\/blog\/deploying-ratpack-application-on-heroku\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/94829ab955a49dca68aebd5e61c357bc7b22dff3b3c43353fece63ce4831657a?s=96&d=mm&r=g","width":96,"height":96,"caption":"Sachin Verma"}},{"@type":"WebPage","@id":"https:\/\/www.tothenew.com\/blog\/deploying-ratpack-application-on-heroku\/#webpage","url":"https:\/\/www.tothenew.com\/blog\/deploying-ratpack-application-on-heroku\/","name":"Deploying Ratpack Application on Heroku | TO THE NEW Blog","description":"Recently, I was working on a micro-service using Ratpack framework. I wanted to deploy it to Heroku. I had tried to find good documentation for deploying on Heroku but couldn't find as such. After much trial and error, I finally managed to get a working configuration for successful deployment. As Heroku has very good support for","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.tothenew.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.tothenew.com\/blog\/deploying-ratpack-application-on-heroku\/#breadcrumblist"},"author":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/sachin-verma\/#author"},"creator":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/sachin-verma\/#author"},"datePublished":"2015-05-29T13:26:36+05:30","dateModified":"2017-04-25T09:59:21+05:30"},{"@type":"WebSite","@id":"https:\/\/www.tothenew.com\/blog\/#website","url":"https:\/\/www.tothenew.com\/blog\/","name":"TO THE NEW Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.tothenew.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"blog","og:title":"Deploying Ratpack Application on Heroku | TO THE NEW Blog","og:description":"Recently, I was working on a micro-service using Ratpack framework. I wanted to deploy it to Heroku. I had tried to find good documentation for deploying on Heroku but couldn't find as such. After much trial and error, I finally managed to get a working configuration for successful deployment. As Heroku has very good support for","og:url":"https:\/\/www.tothenew.com\/blog\/deploying-ratpack-application-on-heroku\/","og:image":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"Deploying Ratpack Application on Heroku | TO THE NEW Blog","twitter:description":"Recently, I was working on a micro-service using Ratpack framework. I wanted to deploy it to Heroku. I had tried to find good documentation for deploying on Heroku but couldn't find as such. After much trial and error, I finally managed to get a working configuration for successful deployment. As Heroku has very good support for","twitter:image":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"19834","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":"","og_description":"","og_object_type":"blog","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":"","og_article_tags":"","twitter_use_og":false,"twitter_card":"summary","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2021-04-29 14:10:30","updated":"2024-02-29 08:57:57","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.tothenew.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.tothenew.com\/blog\/category\/technology\/\" title=\"Technology\">Technology<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tDeploying Ratpack Application on Heroku\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.tothenew.com\/blog"},{"label":"Technology","link":"https:\/\/www.tothenew.com\/blog\/category\/technology\/"},{"label":"Deploying Ratpack Application on Heroku","link":"https:\/\/www.tothenew.com\/blog\/deploying-ratpack-application-on-heroku\/"}],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/19834","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/40"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=19834"}],"version-history":[{"count":0,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/19834\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=19834"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=19834"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=19834"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}