This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-09-08
Channels
- # announcements (32)
- # aws (2)
- # babashka (21)
- # beginners (143)
- # cider (3)
- # cljsrn (13)
- # clojure (65)
- # clojure-dev (7)
- # clojure-europe (20)
- # clojure-losangeles (8)
- # clojure-nl (13)
- # clojure-norway (39)
- # clojure-uk (9)
- # clojurescript (39)
- # code-reviews (10)
- # conjure (2)
- # cursive (3)
- # datascript (6)
- # datomic (40)
- # events (5)
- # exercism (23)
- # fulcro (9)
- # funcool (2)
- # girouette (2)
- # graphql (4)
- # helix (8)
- # improve-getting-started (4)
- # integrant (7)
- # introduce-yourself (5)
- # jobs (3)
- # luminus (32)
- # malli (3)
- # off-topic (10)
- # pathom (9)
- # pedestal (4)
- # polylith (25)
- # practicalli (1)
- # re-frame (4)
- # sci (3)
- # shadow-cljs (5)
- # tools-deps (25)
- # vim (31)
- # xtdb (32)
I see that the luminus docs include instructions on how to deploy to Heroku. Do those instructions apply to the frontend as well? I want to create a full stack app with re-frame and shadow-cljs on the frontend. Do I follow the shadow-cljs instructions for building a release build as well as the clojure side instructions for Heroku and it'll all work? Since Heroku has a postgres setup and the instructions include directions for that, when building my Luminus template, can I just use the +postgres
addon and it should work as detailed? So the full app creation would be lein new luminus my-app +reitit +re-frame +shadow-cljs +postgres
. Any other advice I should know about deploying such an app?
It was mentioned in the #clojure channel that including shadow-cljs and npm did not work with the heroku build packs so he had to create a Docker image and push that instead. But I don't think he was using luminus and I'm not sure if luminus is using those default build packs or has figured out their own approved approach to such things
Hi, again 😉 I did in fact use Luminus. After a little googling, it seems other people faced similar problems with shadow-cljs on Heroku Maybe this is also interesting to you: https://clojureverse.org/t/deploying-to-heroku-dependencies-of-npm-packages-not-getting-installed-when-deploying-app/4441
In this post, a custom build script is created for use on Heroku (although it’s fulcro): https://folcon.github.io/post/2020-04-12-Fulcro-on-Heroku/
That first one used Docker too it seems . The second one might work but this is all looking a bit hairy for my current dev ops skills. But that's how we learn I guess. I'm jealous of like the Next.js folks just using Vercel and calling into something like Supabase for auth and db needs. Seems way easier (but is it simpler...)
Had some time on my hands and tried it. I created a new luminus app with your proposed command from above: lein new luminus my-app +reitit +re-frame +shadow-cljs +postgres
and pushed it to Heroku
So for the default without doing anything it definitely fails
I then tried to add the npm buildpack and clojure buildpack together, but I get the same error:
Hmm, ok. I'm over here still trying to get that template running with my postgres credentials. That's also kind of new to me. lol
I feel like the process will be building out the frontend using the shadow-cljs instructions and then matching that with heroku's js instructions since then it will be js?
There seems to be an issue in the template, when I lein uberjar
a freshly created application locally on my machine, I get the same errors
The struct 1.4.0 version is quite old, so I guess there is a transient dependency which is a problem
I'm still having stupid postgres authentication errors over here though. In my limited experience I've found that whole thing brittle too but it seems to be well loved so that's definitely user error on my part
Want to share your (anonymized, obfuscated) DB config?
Got the compile error, though. The latest luminus-template includes funcool/cuerdas
as a dependency. This is also a transient dependency of funcool/struct
, and there is a conflict
Ahh. For the DB stuff I'm getting a password authentication error
so trying to work through that.
I usually run it locally on Docker so I don’t have to install it on the system directly…
https://github.com/luminus-framework/luminus-template/issues/547 Created an issue for the initial error
If it helps: docker run -p 5432:5432 --name db-name -e POSTGRES_PASSWORD=mypass -d postgres:12.2