This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-08-24
Channels
- # adventofcode (2)
- # anglican (1)
- # announcements (4)
- # aws (2)
- # babashka (28)
- # beginners (18)
- # brompton (3)
- # calva (22)
- # clj-kondo (2)
- # cljdoc (29)
- # clojure (41)
- # clojure-europe (28)
- # clojure-gamedev (14)
- # clojure-nl (2)
- # clojure-spec (2)
- # clojure-sweden (1)
- # clojure-uk (6)
- # clojurescript (53)
- # css (3)
- # cursive (6)
- # duct (3)
- # emacs (5)
- # fulcro (29)
- # introduce-yourself (1)
- # liberator (5)
- # lsp (1)
- # malli (11)
- # meander (4)
- # nbb (11)
- # off-topic (17)
- # pathom (2)
- # polylith (8)
- # practicalli (1)
- # react (6)
- # reagent (11)
- # releases (2)
- # rewrite-clj (11)
- # shadow-cljs (59)
- # tools-deps (21)
- # vim (11)
Hi! I would appreciate if anyone could share their experience deploying a polylith project to Ions
I’m having trouble doing it naively, the code (components, bases) do not get into the app directory from the ion artifact, but in the root, so they are not found in the classpath
First of all, which version of Datomic ions are you using? We are quite a bit behind of the current version (668-8927).
Another thing is, Datomic does not fully support monorepos. That’s said, there is an easy way to go around it.
Normally, Datomic expects a git repository per application to deploy. However, in Polylith, you may have multiple projects that represent multiple Datomic applications living under the same monorepo.
We currently have 3 different Polylith projects that we use with Datomic Ions. One is deployed as Primary Group and other two are deployed as different Query Groups for different purposes under the same Datomic system. What we do is, we keep each Datomic configuration under projects/PROJECT_NAME/resources/datomic/ion-config.edn
. Each project also have :ion-dev
alias in their own deps.edn
file. Then, we use the unreproducible push/deploy with Datomic to deploy our changes, since otherwise, all projects will have the same revision id due to the fact that Datomic uses the git commit for deployments. In order to make those unreproducible deployments reproducible on our side, we create unique revision names ourselves in a format such as BRANCH_NAME-SHA-PROJECT_NAME
.
We created a simple bash script where we push and deploy using the method above. We deploy the project by writing on terminal: ./ion-deploy.sh backend
where backend
is one of the projects in our Polylith workspace.
Here is the script that we use to deploy, if it helps.
@furkan3ayraktar is the right person to answer this.