Pay-Me is a small example of a dummy payment provider service, built with Clojure and Duct. The different components are hooked up using core/async channels.
$> lein cljsbuild auto
lein repl user=> (go)
The service now runs on http://localhost:3000.
When you make changes to your source files, use
reset to reload any
modified files and restart the server.
user=> (reset) :reloading (...) :started
lein uberimage to package the service as a Docker image.
Note that the
uberimage plugin expects the Docker API to be available on http://127.0.0.1:2375. At least on OS X,
a workaround is necessary to expose the API.
When running in the Docker container, the application is started using a shell script.
Logging is redirected to
/var/log/pay-me/pay-me.log. This is simply because this is the pattern of logging I tend to follow
when deploying Docker containers (gather logs on host, store them somewhere).