Skip to content

Commit

Permalink
feature: external Haskell node client interoperability with cardano-n…
Browse files Browse the repository at this point in the history
…ode-ogmios

- Adds a top-level `ipc` directory for the cardano-node socket
to be created in, which can be mounted for multi-container stacks.
- Document the mount point, and improve the existing docs.
  • Loading branch information
rhyslbw committed Jun 12, 2021
1 parent d06992e commit 55c510d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Expand Up @@ -137,7 +137,7 @@ RUN wget -q ${CARDANO_CONFIG_URL}/testnet-shelley-genesis.json
RUN wget -q ${CARDANO_CONFIG_URL}/testnet-topology.json

RUN find . -name "*config*.json" -print0 | xargs -0 sed -i 's/127.0.0.1/0.0.0.0/g' > /dev/null 2>&1

RUN mkdir /ipc
WORKDIR /root
COPY scripts/cardano-node-ogmios.sh cardano-node-ogmios.sh
CMD ["bash", "cardano-node-ogmios.sh" ]
6 changes: 5 additions & 1 deletion docs/content/getting-started/docker.md
Expand Up @@ -59,7 +59,11 @@ Let's explore a bit the various options:

##### -v

`-v` mounts a shared volume with the container on your host machine. In this case, it is the node's blockchain database to make the container more portable. This way, you can more easily restart a container on a newer image while keeping the data readily available (and without having to resync the entire chain!).
`-v` mounts a shared volume with the container on your host machine, either via bind mounts or named volumes.

###### Mount points
- `db/{NETWORK_NAME}` - persist the `cardano-node` DB to avoid re-syncing the chain whenever a new container is run. This is done on every version upgrade and is recommended for most use-cases.
- `/ipc` if this image is used in a multi-container stack with an external Haskell node client.

Find more about run options in the docker user documentation.

Expand Down
4 changes: 2 additions & 2 deletions scripts/cardano-node-ogmios.sh
Expand Up @@ -27,7 +27,7 @@ cardano-node run\
--port 3000\
--host-addr 0.0.0.0\
--config /config/$NETWORK-config.json\
--socket-path ./node.socket&
--socket-path /ipc/node.socket&
status=$?
if [ $status -ne 0 ]; then
echo "Failed to start cardano-node: $status"
Expand All @@ -36,7 +36,7 @@ fi

OGMIOS_NETWORK=$NETWORK ogmios \
--host 0.0.0.0\
--node-socket ./node.socket &
--node-socket ./ipc/node.socket &
status=$?
if [ $status -ne 0 ]; then
echo "Failed to start ogmios: $status"
Expand Down

0 comments on commit 55c510d

Please sign in to comment.