GithubHelp home page GithubHelp logo

psfblair / docker-datomic-free Goto Github PK

View Code? Open in Web Editor NEW

This project forked from colinrymer/docker-datomic-free

0.0 1.0 0.0 46 KB

Source of docker image for Datomic-free

License: Other

Shell 43.86% Ruby 56.14%

docker-datomic-free's Introduction

Datomic/Free

Non-official Docker image for Datomic/Free edition to simplify setting up Datomic database.

Prebuilt images are hosted on publicly on docker index. Currently it's mandatory to use version tag, until i'll finish testing part, then i can will publish image tagged as latest and 'll release newer versions than 0.9.4699.

More documentation is coming soon.

Usage

Deployment version

It is used to build new docker images. As you can see, this example expects that you have already installed Vagrant. If not, then please install it.

  1. Before running code examples, please move into vagrant/deploy folder
$> vagrant up

This command sets up proper machine with preinstalled java, docker and it downloads source code of datomic-tester for testing.

  1. Start Datomic on docker container
$> vagrant ssh
$> docker run -p 4334:4334 --rm tauho/datomic-free:0.9.4699
  1. Test locally built docker images on another console pane
$> cd vagrant/deploy

$> vagrant ssh
$> docker ps
$> docker inspect <container-id>

//is port open?
$> nmap -p 4334 -sT 172.17.0.2

//test datomic on repl
$> cd datomic_tester
$> lein repl
repl> (require '[datomic.api :as d])
repl> (def uri "datomic:free://172.17.0.2:4334/test")
repl> (d/create-database uri)
repl> (def conn (d/connect uri))
repl> (def schema (read-string (slurp "samples/seattle/seattle-schema.dtm")))
repl> (first schema)
repl> (def resp @(d/transact conn schema))
repl> (pprint resp)

Voila! It's working as expected and ready to release new version.

Demo version

It fires up Ubuntu/14.04 virtualmachine and during the first run it'll run provision, which installs docker and pulls tauho/datomic-free baseimage from Docker's public index.

After successfull provisioning, it will execute script "run_datomic.sh", which will run new datomic container as daemon process.

$> cd  vagrant/run
$> vagrant up

;; if provision fails, you can re-runned it again
$> vagrant provision

;;check datomic's container on host
$> vagrant ssh
$> docker ps
 ... here will be a list of all running containers
$> docker inspect <container-id>
 ... all the metainfo

 ;; use following command to run interactive shell on the new datomic container
$> docker run --rm -i -t tauho/datomic-free:0.9.4699 /bin/bash

after successful provision you will see metainfo of the running datomic container;

Updating

Fork it, made changes on new branch and send your pull request.

Credits

All rights reserved by Cognitect Inc

docker-datomic-free's People

Contributors

alexpetrov avatar colinrymer avatar marcopolo avatar timgluz avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.