{"id":418,"date":"2014-02-06T11:52:59","date_gmt":"2014-02-06T08:52:59","guid":{"rendered":"http:\/\/www.suuronen.eu\/blog\/?p=418"},"modified":"2014-02-06T11:53:16","modified_gmt":"2014-02-06T08:53:16","slug":"clojure-compojure-app-in-heroku","status":"publish","type":"post","link":"https:\/\/suuronen.eu\/blog\/clojure-compojure-app-in-heroku\/","title":{"rendered":"Clojure compojure app in Heroku"},"content":{"rendered":"<p>Tried out today the clojure compojure app deployment into <a href=\"http:\/\/heroku.com\" target=\"_blank\">heroku.com<\/a> cloud service. Deployment didn&#8217;t went as smoothly as one might have expected:<\/p>\n<ol>\n<li>By default it wanted to use Java6 instead of Java7.<\/li>\n<li>App didn&#8217;t start.<\/li>\n<li>It wanted to use older (&lt; 2.0) Leiningen by default.<\/li>\n<li>App was oddly named in the heroku&#8217;s end,\u00a0 and resulted non-descriptive domain url.<\/li>\n<\/ol>\n<p>These all were easy to fix:<\/p>\n<ol>\n<li>Add a new file into your project&#8217;s root:\n<pre> echo \"java.runtime.version=1.7\" &gt; system.properties<\/pre>\n<\/li>\n<li>Add a new file into your project&#8217;s root:\n<pre> echo \"web: lein ring server-headless $PORT\" &gt; Procfile<\/pre>\n<\/li>\n<li>Add into <em>project.clj<\/em> file:\n<pre>:min-lein-version \"2.0.0\"<\/pre>\n<\/li>\n<li>You can simply rename the app through the heroku <a href=\"https:\/\/dashboard.heroku.com\/apps\" target=\"_blank\">dashboard<\/a>\u00a0 and app&#8217;s settings pane, with rename functionality. Note that the heroku git repository name also changes, so you have to manually change it into your local project&#8217;s .<em>\/git\/config-file<\/em> so you can continue pushing into production.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Tried out today the clojure compojure app deployment into heroku.com cloud service. Deployment didn&#8217;t went as smoothly as one might have expected: By default it wanted to use Java6 instead of Java7. App didn&#8217;t start. It wanted to use older &hellip; <a href=\"https:\/\/suuronen.eu\/blog\/clojure-compojure-app-in-heroku\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[26,27],"class_list":["post-418","post","type-post","status-publish","format-standard","hentry","category-coding","tag-clojure","tag-heroku"],"_links":{"self":[{"href":"https:\/\/suuronen.eu\/blog\/wp-json\/wp\/v2\/posts\/418","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/suuronen.eu\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/suuronen.eu\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/suuronen.eu\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/suuronen.eu\/blog\/wp-json\/wp\/v2\/comments?post=418"}],"version-history":[{"count":8,"href":"https:\/\/suuronen.eu\/blog\/wp-json\/wp\/v2\/posts\/418\/revisions"}],"predecessor-version":[{"id":427,"href":"https:\/\/suuronen.eu\/blog\/wp-json\/wp\/v2\/posts\/418\/revisions\/427"}],"wp:attachment":[{"href":"https:\/\/suuronen.eu\/blog\/wp-json\/wp\/v2\/media?parent=418"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/suuronen.eu\/blog\/wp-json\/wp\/v2\/categories?post=418"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/suuronen.eu\/blog\/wp-json\/wp\/v2\/tags?post=418"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}