Skip to content

Commit

Permalink
feat(docker)!: save MongoDB in volume (#264)
Browse files Browse the repository at this point in the history
  • Loading branch information
grtlr authored Jun 13, 2022
1 parent 9c68717 commit 2f62df6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,16 @@ The easiest way to start Chronicle is by using our supplied Dockerfile.
First you need to setup the correct permissions for the node's database:

```sh
mkdir docker/alphanet

mkdir docker/hornet_data
groupadd -g 65532 nonroot
useradd -g nonroot -u 65532 nonroot
chown nonroot:nonroot docker/alphanet/
chown nonroot:nonroot docker/hornet_data/
```

We mount the MongoDB database as an additional volume, with appropriate permissions:
```sh
mkdir docker/chronicle_data
chown 999:999 docker/chronicle_data/
```

After that, with Docker installed on your system, you can spin up Chronicle by running the following command from the root of the repository.
Expand Down
4 changes: 3 additions & 1 deletion docker/docker-compose.hornet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ services:
image: mongo
restart: always
command: --quiet --logpath /dev/null
volumes:
- ./chronicle_data:/data/db

inx-chronicle:
build:
Expand Down Expand Up @@ -41,7 +43,7 @@ services:
cap_drop:
- ALL
volumes:
- ./alphanet:/app/alphanet
- ./hornet_data:/app/alphanet
- ./config.hornet.json:/app/config.json:ro
command:
- "-c"
Expand Down

0 comments on commit 2f62df6

Please sign in to comment.