Fork me on GitHub
#heroku
<
2021-05-29
>
sandeep18:05:12

hello guys, im struggling to deply a clojure app in heroku

3
sandeep18:05:29

i am trying to deploy this repo to heroku

sandeep18:05:01

added proc file : web: java -cp pingcrm.jar clojure.main -m pingcrm.system

sandeep18:05:25

bin/build : #!/usr/bin/env bash clojure -A:depstar -m hf.depstar.uberjar pingcrm.jar

sandeep18:05:45

and empty project.clj file

sandeep18:05:19

keep on getting. : Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 180 seconds of launch

practicalli-johnny21:05:03

Are you reading in the PORT environment variable that Heroku provides when starting the web server (i.e jetty) ? If jetty is not run using the provided port value, Heroku will shut it down (as Heroku cannot route traffic to the app)

practicalli-johnny21:05:20

If I read the code correctly, then it seems the port is hard coded to port 3000 This will fail when run on Heroku

practicalli-johnny21:05:44

This page has examples of how I deployed a Clojure WebApp project managed by Clojure CLI tools. Hopefully you find some of it useful. https://practical.li/clojure-webapps/projects/banking-on-clojure/deployment-via-ci.html

practicalli-johnny21:05:53

I'll try deploy a fork of your project in the morning, it looks very interesting

sandeep10:05:10

not my project. yep interesting so i decided to try as well