Fork me on GitHub

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: ./ backend where backend is one of the projects in our Polylith workspace.


Here is the script that we use to deploy, if it helps.


Thank you! This certainly provides me a way forward. Will try it an report back!


@furkan3ayraktar is the right person to answer this.



👍 3