Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: Add instructiosn to switch networks and volumes #47

Merged
merged 1 commit into from
Nov 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions docs/switch-networks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Switch networks when using Docker Compose

When running Marlowe starter kit, there are three different networks to use alongside the `NETWORK` environment variable: preview, preprod, and mainnet.

Stop the running containers with:

```
$ docker-compose down
```

Notice the containers are removed although the volumes are not removed. List the volumes by:

```
$ docker volume ls
```

This is generally desirable because it allows running the starter kit on the same network with significantly less sync time in the future.

However when switching networks without removing the volumes, the logs will show a network mismatch. The example below shows an attempt from switching between preprod to preview.

```
marlowe-starter-kit-node-1 | NetworkMagicMismatch "/data/db/protocolMagicId" (NetworkMagic {unNetworkMagic = 1}) (NetworkMagic {unNetworkMagic = 2})
```

Remove the associated volumes by passing the volume flag. If the container is still running, the force flag (`-f`) may be needed as well to remove the volume.

```
docker-compose down -v
```