summaryrefslogtreecommitdiff
path: root/historic/docker/README
diff options
context:
space:
mode:
Diffstat (limited to 'historic/docker/README')
-rw-r--r--historic/docker/README90
1 files changed, 90 insertions, 0 deletions
diff --git a/historic/docker/README b/historic/docker/README
new file mode 100644
index 0000000..6998ee3
--- /dev/null
+++ b/historic/docker/README
@@ -0,0 +1,90 @@
+=== Dockerizing the Exchange/Merchant ===
+
+This section shows how to run a "dockerized" exchange/merchant.
+The exchange uses postgresql (container) and is served
+by nginx (container). The merchant instead depends on exchange
+(container) and postgresql (container).
+
+The docker's tools needed are: docker, docker-compose, docker-machine.
+Please refer to Docker's official documentation for their installation
+instructions.
+
+Before starting to build the exchange/merchant's image, make sure a
+docker-machine instance is up and running.
+
+1. Build the images.
+
+<COMPONENT> is either 'exchange' or 'merchant', depending on what is
+to be built.
+
+From <THIS_REPO/docker/<COMPONENT>, give:
+
+# NOTE for 'merchant' build: as default, the merchant is configured
+# to work with the 'demo' exchange running at exchange.demo.taler.net.
+# Nonetheless, edit (before building) the files
+# <THIS_REPO>/docker/merchant/exchange_{pub,url}.txt, in case the merchant
+# needs to work with any other exchange.
+
+$ docker-compose build
+
+2. Launch the service.
+
+The following command launches the <COMPONENT> and all other services
+it depends on. From the same directory as the previous step, issue:
+
+$ docker-compose up
+
+If everything worked as expected, you should see some live logging
+from all the containers.
+(Errors about existing roles/databases can be ignored.)
+
+3. Test
+
+Issue the following command to see if the <COMPONENT> has been
+correctly installed and launched.
+
+# Some 'greeting' message should be returned. Note, the
+# service runs on port 80.
+
+$ curl http://`docker-machine ip`/
+
+
+=== How to use these images ===
+
+This section explains how to (1) build and (2) run individual
+images -- that is often not useful to run services, as they need
+to be "composed" in order to work properly.
+
+(1) is done by:
+
+$ docker build -t taler/base <THIS_REPO>/docker/base/
+$ docker build -t taler/exchange <THIS_REPO>/docker/exchange/
+
+Note that the value passed to option -t is completely arbitrary.
+
+(2) is done by:
+
+$ docker run -it taler/exchange
+
+=== How to destroy them ===
+
+Consider also the --no-cache option to force a rebuild.
+
+ $ docker build --no-cache <THIS_REPO>/docker/base
+
+1. Stop all containers:
+
+ $ docker stop $(docker ps -a -q)
+
+
+2. If necessary, remove all containers:
+
+ $ docker rm $(docker ps -a -q)
+
+3. Remove images:
+
+ $ docker rmi -f $(docker images -q)
+
+
+NOTE: for tripwire users, those commands are all defined
+ as aliases.