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

docs: update deployment docs #2107

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 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
22 changes: 10 additions & 12 deletions docs/hyperchains_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,9 @@ Once you have the necessary configuration files, you can run the middleware usin
docker run -it --rm \
-p 3013:3013 \
-p 4000:4000 \
-e AETERNITY_CONFIG=/home/aeternity/aeternity.yaml \
-v ${PWD}/${NAME}/nodeConfig/aeternity.yaml:/home/aeternity/aeternity.yaml \
-v ${PWD}/${NAME}/nodeConfig/${NAME}_accounts.json:/home/aeternity/node/local/rel/aeternity/data/aecore/${NAME}_accounts.json \
-v ${PWD}/${NAME}/nodeConfig/${NAME}_contracts.json:/home/aeternity/node/local/rel/aeternity/data/aecore/${NAME}_contracts.json \
-v ${PWD}/${NAME}/nodeConfig/aeternity.yaml:/home/aeternity/.aeternity/aeternity/aeternity.yaml \
-v ${PWD}/${NAME}/nodeConfig/${NAME}_accounts.json:/home/aeternity/node/data/aecore/${NAME}_accounts.json \
-v ${PWD}/${NAME}/nodeConfig/${NAME}_contracts.json:/home/aeternity/node/data/aecore/${NAME}_contracts.json \
aeternity/ae_mdw
```

Expand Down Expand Up @@ -65,17 +64,16 @@ To ensure data persistence across container restarts:
docker run -it --rm \
-p 3013:3013 \
-p 4000:4000 \
-e AETERNITY_CONFIG=/home/aeternity/aeternity.yaml \
-v ${PWD}/${NAME}/nodeConfig/aeternity.yaml:/home/aeternity/aeternity.yaml \
-v ${PWD}/${NAME}/nodeConfig/${NAME}_accounts.json:/home/aeternity/node/local/rel/aeternity/data/mnesia/${NAME}_accounts.json \
-v ${PWD}/${NAME}/nodeConfig/${NAME}_contracts.json:/home/aeternity/node/local/rel/aeternity/data/mnesia/${NAME}_contracts.json \
-v ${PWD}/data/mnesia:/home/aeternity/node/local/rel/aeternity/data/mnesia \
-v ${PWD}/data/mdw.db:/home/aeternity/node/local/rel/aeternity/data/mdw.db \
-v ${PWD}/${NAME}/nodeConfig/aeternity.yaml:/home/aeternity/.aeternity/aeternity/aeternity.yaml \
-v ${PWD}/${NAME}/nodeConfig/${NAME}_accounts.json:/home/aeternity/node/data/mnesia/${NAME}_accounts.json \
-v ${PWD}/${NAME}/nodeConfig/${NAME}_contracts.json:/home/aeternity/node/data/mnesia/${NAME}_contracts.json \
-v ${PWD}/data/mnesia:/home/aeternity/node/data/mnesia \
-v ${PWD}/data/mdw.db:/home/aeternity/node/data/mdw.db \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change works but as this is for persistent running, to work across restarts, it could run with a named contained (without the -rm). It would help a lot on the restart to avoid mapping all volumes again, specially to avoid conflict on the configs that was chosen for starting and should not be changed.

aeternity/ae_mdw
```

- `-v ${PWD}/data/mnesia:/home/aeternity/node/local/rel/aeternity/data/mnesia`: Persists the node database.
- `-v ${PWD}/data/mdw.db:/home/aeternity/node/local/rel/aeternity/data/mdw.db`: Persists the middleware database.
- `-v ${PWD}/data/mnesia:/home/aeternity/node/data/mnesia`: Persists the node database.
- `-v ${PWD}/data/mdw.db:/home/aeternity/node/data/mdw.db`: Persists the middleware database.

With this setup, the middleware will retain its state even after the container is stopped or restarted.

Expand Down
12 changes: 6 additions & 6 deletions docs/middleware_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Overview

AeMdw is a middleware that acts as a caching and reporting layer for the [æternity blockchain](https://github.com/aeternity/aeternity). It responds to queries more efficiently than the node and supports additional queries.
AeMdw is a middleware that acts as a caching and reporting layer for the [æternity blockchain](https://github.com/aeternity/aeternity). It responds to queries more efficiently than the node and supports additional queries.

The middleware runs an Aeternity Node alongside it in the same Docker container and BEAM VM instance. This node can be configured using the `aeternity.yaml` file or by passing environment variables, just like configuring the node directly.

Expand Down Expand Up @@ -73,16 +73,16 @@ If you want to use a database snapshot:
Start the container with the following command:

```
docker run -d \
docker run -it --rm \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here as well

-p 4000:4000 \
-p 4001:4001 \
-p 3113:3113 \
-p 3013:3013 \
-p 3014:3014 \
-v ${PWD}/data/mnesia:/home/aeternity/node/local/rel/aeternity/data/mnesia \
-v ${PWD}/data/mdw.db:/home/aeternity/node/local/rel/aeternity/data/mdw.db \
-v ${PWD}/log:/home/aeternity/node/ae_mdw/log \
-e AETERNITY_CONFIG=/home/aeternity/aeternity.yaml \
-v ${PWD}/data/mnesia:/home/aeternity/node/data/mnesia \
-v ${PWD}/data/mdw.db:/home/aeternity/node/data/mdw.db \
-v ${PWD}/log:/home/aeternity/ae_mdw/log \
-v ${PWD}/docker/aeternity.yaml:/home/aeternity/.aeternity/aeternity/aeternity.yaml \
aeternity/ae_mdw:latest
```

Expand Down
Loading