Datahike + Heroku = Instant Datalog backed Clojure Web App
Some time ago I looked into easy simple deployment options for a hobby Clojure web app.
My main objectives being:
not dealing with Google Cloud or AWS complexities
and also not managing my own VPS
a Datalog database
I used Heroku in my Ruby on Rails heydays, where it shined with simplicity. Turns out, it is still around and it looks well suited for deploying a Clojure app.
Heroku + Clojure + deps.edn
Heroku has an integration with Leiningen and a complete guide for Clojure with a demo app. However, I prefer the Clojure CLI tools with a deps.edn over Leiningen for managing my projects.
One can do that by just providing a custom bin/build file in the app repository, together with a Procfile which in tandem tell Heroku exactly how to build and then run the app.
You all know Datomic, which I love and use in production. Datahike is also a Datalog database, which started as a port of DataScript, but has quite evolved and can persist data into a bunch of backends, including PostgresSQL.
Datahike + Heroku PostgreSQL
The Postgres database once can provision for an Heroku app can be used with out of the box Datahike with after they fixed a configuration issue. One just has to deconstruct the DATABASE_URL Heroku provides and feed it into the Datahike configuration.