This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-08-14
Channels
- # announcements (31)
- # babashka (9)
- # beginners (4)
- # calva (67)
- # cider (6)
- # clj-yaml (10)
- # clojure (105)
- # clojure-austin (8)
- # clojure-bay-area (1)
- # clojure-europe (12)
- # clojure-germany (3)
- # clojure-nl (1)
- # clojure-norway (7)
- # clojure-uk (2)
- # clojurescript (5)
- # core-logic (4)
- # data-science (29)
- # datomic (6)
- # dev-tooling (5)
- # emacs (3)
- # hyperfiddle (22)
- # introduce-yourself (4)
- # lsp (8)
- # malli (10)
- # off-topic (8)
- # pathom (74)
- # polylith (39)
- # practicalli (1)
- # reitit (3)
- # shadow-cljs (2)
- # spacemacs (3)
- # squint (4)
- # tools-deps (4)
Not Electric-related but for my Electric app: how are guys deploying uberjars in the wild? At the moment, I'm running a GH build runner on my prod machine, on successful build, delete old uberjar, download build artifact and cycling SystemD service. Without going full K8s, is there a nicer blue/green deployment strategy that plays nicely with Clojure apps? cc @robert-stuttaford are you using Immutant perhaps?
I build a docker image on the CI and deploy that. Develop on a branch where CI only runs the unit tests then when merged into master CI will build a docker image, SSH into my prod machine pull the image and restart the container.
(btw. Java / Clojure is already virtualized – don't need Docker. I ditched it - less complexity)
I'm doing pretty much the same: uberjar, overwrite the jar on prod server, restart service. Simple, fast, efficient.
I've worked with teams that would waste weeks/months of developer time building a deployment chain... "chaining" themselves to a particular ecosystem.
Know any tricks to speed up uberjar build? My (relatively simple) Electric app takes 4 minutes to build on GH actions standard-sized box. Parallelising cljs & clj is the natural start.
No sorry. Currently all my prod apps are Clojure only or built with Reagent in the case of SPAs. I hope to go deeper in Electric soon.
our production build. we use buildkite and our own babashka scripts to orchestrate everything. ">" in this listing means 'wait for everything to the left before starting the stuff on the right':
@robert-stuttaford haven't used Buildkite. Any advantages over GH Actions? (I'm principally wary of putting too many eggs in one basket with GH)
its agents run on our EC2 instances, so we can control perf and keep everything inside our security cordon
btw. GH Actions has self-hosted runners
we built this system before GHA was a thing 🙂
we only use GH for source hosting, we don't really use PRs or any of that jazz
junk in da trunkkkk
@robert-stuttaford have you seen Pijul? https://pijul.org/
Jujutsu has similar first-class conflicts https://github.com/martinvonz/jj
jj looks neat
I'm holding out for a Lisp-syntax aware VCS that has first-class conflict resolution so whitespace changes do not add noise. Just let the client format their code maybe with metadata about how they want it formatted.
How to support multiple manifests / frontends in one Electric project? I want to split my app in two: thin view for anon clients and thicc view for admins, but same project. I could make a separate project, but different ports and other annoyances. I've added another shadow-cljs build, which compiles, but index.html module templating is the same and I see admin namespaces in the "client" manifest. Ideally I would like the client connection be keyed on namespace or build ID and then I only get the AST stuff I need for a particular frontend. In meantime will probably combine the two and do different routing for the time being with an /admin route.
from this perspective Electric apps are ordinary shadow-cljs apps
so check your :require graph