Skip to content

fabiogouw/datomic-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Datomic Starter docker image

This repository contains the source code for a docker image for running Datomic Starter edition. I made this one to easily spin up a dev / test environment, so I can use it to run integration tests using libraries like Test Containers.

This image is based on the clojure official image. It starts both the Datomic's transactor (the one that receives the writes requests and stores them) and the Datomic console, so I can use it to query the database.

After cloning the repo, in the terminal using a machine that has Docker installed, go to the src folder and run the command below, replacing the following parameters:

  • datomic_version - the Datomic version you want to use. It's optional and if not provided, the default value is 1.0.6726

All these information can be obtained in Datomic's account page.

docker build -t my-datomic-starter:0.1 --build-arg datomic_version={{datomic_version}} . 

As an example:

docker build -t my-datomic-starter:0.1 --build-arg datomic_version=1.0.6726 . 

To run, you just need to create the container.

docker run -d -p 8080:8080 -p 4334:4334 my-datomic-starter:0.1

Go to http://localhost:8080/browse and you'll have access to the Datomic console. Also, you can connect to the containter to get access to the shell and start a new REPL instance to interact with Datomic (in the image below, there's and exemple on how to do it and create a new database and insert some datoms on it).

Connecting to a container and running some Clojure commands on REPL

About

A docker image ready to run Datomic Starter edition

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published