{"id":15010435,"url":"https://github.com/vharmain/heroku-clj-docker","last_synced_at":"2026-03-27T03:41:50.802Z","repository":{"id":132418305,"uuid":"156011576","full_name":"vharmain/heroku-clj-docker","owner":"vharmain","description":"Example of deploying Dockerized Clojure app to Heroku using Docker builds with heroku.yml beta feature","archived":false,"fork":false,"pushed_at":"2018-11-04T10:30:14.000Z","size":11,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-20T06:16:37.477Z","etag":null,"topics":["clj","clojure","example","heroku","heroku-docker","tools-deps"],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vharmain.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-03T18:22:54.000Z","updated_at":"2023-11-11T07:36:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"e59dee05-a940-4ce9-bd7c-888be0642375","html_url":"https://github.com/vharmain/heroku-clj-docker","commit_stats":{"total_commits":16,"total_committers":1,"mean_commits":16.0,"dds":0.0,"last_synced_commit":"72143dd7041fc38ecd35603087211a39ef371ad9"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vharmain%2Fheroku-clj-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vharmain%2Fheroku-clj-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vharmain%2Fheroku-clj-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vharmain%2Fheroku-clj-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vharmain","download_url":"https://codeload.github.com/vharmain/heroku-clj-docker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243382783,"owners_count":20282007,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clj","clojure","example","heroku","heroku-docker","tools-deps"],"created_at":"2024-09-24T19:34:13.570Z","updated_at":"2025-12-27T20:03:02.354Z","avatar_url":"https://github.com/vharmain.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Heroku CLJ Docker\n\nUsing [Docker builds with\nheroku.yml](https://devcenter.heroku.com/articles/docker-builds-heroku-yml)\nbeta feature to deploy [Dockerized](https://www.docker.com/)\n[Clojure](https://clojure.org/) app to [Heroku](https://heroku.com/).\n\n## Motivation\nHeroku has [great support for\nClojure](https://devcenter.heroku.com/categories/clojure-support)\nusing [lein](https://leiningen.org/) build tool but not all projects\nwant to be tied to lein or they require more flexibility with build\nand deployment than Heroku standard tooling for Clojure provides. This\nproject is an example how to use Docker with [deps and\nclj](https://clojure.org/guides/deps_and_cli) to build and run Clojure\napplications in Heroku. Same strategy can be used with any other build\ntool.\n\n## Usage\n\n### Prerequisites\n\n* [docker](https://docs.docker.com/install/)\n* [docker-compose](https://docs.docker.com/compose/install/)\n* [Heroku account](https://signup.heroku.com/)\n* [heroku-cli](https://devcenter.heroku.com/articles/heroku-cli)\n\n### Setup\n\n``` shell\nheroku update beta\nheroku plugins:install @heroku-cli/plugin-manifest\nheroku login\n\ngit clone https://github.com/vharmain/heroku-clj-docker.git\ncd heroku-clj-docker\n\nheroku create insert-app-name-here --manifest\nheroku git:remote -a heroku-clj-docker\n```\n\n### Deploy to Heroku\n\nCommiting any change to `heroku` remote triggers deploy.\n\n``` shell\ngit add -A\ngit commit -m \"My first commit\"\ngit push heroku master\n\n# Watch logs\nheroku logs --tail\n```\n\n### Run locally\n\n``` shell\ndocker-compose up web\n```\n\n## Observations and notes\n\n* One of the least painful Docker deployment experiences I've\n  had. Heroku provides excellent ergonomics what comes to developer\n  experience. Commands such as `heroku logs --tail` and `heroku run\n  bash` work similarly to 'normal' buildpacks.\n* I first tried running the app directly with `clj` (no\n  uberjaring). During build time `.m2` folder resolves under $HOME/.m2\n  but on container start clj/maven tries to lookup `.m2` relative to\n  `WORKDIR` defined in Dockerfile. In practice this meant that all\n  dependencies would be downloaded on each restart. Workaround to this\n  is to either build uberjar on build time or place the app directly\n  to users home folder and use it as the WORKDIR (see\n  [Dockerfile-no-uberjar](Dockerfile-no-uberjar)) so Maven can find\n  .m2. What is causing this? I'm not sure but I'm suspecting that some\n  ENV var supplied by Heroku is getting Maven confused where $HOME is\n  at runtime. I wasn't able to reproduce this locally with\n  docker-compose.\n* Heroku has [some\n  limitations](https://devcenter.heroku.com/articles/container-registry-and-runtime#known-issues-and-limitations)\n  with Docker.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvharmain%2Fheroku-clj-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvharmain%2Fheroku-clj-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvharmain%2Fheroku-clj-docker/lists"}