Skip to content

Commit 56fe25a

Browse files
Update docker doc on how to set snapshot download directory
1 parent 8016bfa commit 56fe25a

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

doc/docker.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,47 @@ RESTORE_SNAPSHOT=https://update-cardano-mainnet.iohk.io/cardano-db-sync/db-sync-
7272
docker-compose up && docker-compose logs -f
7373
```
7474

75+
### Set folder where to download snapshot
76+
77+
The snapshot is downloaded in current working directory. Setting the working directory should allow to choose where the download is done.
78+
79+
For `docker-compose`:
80+
81+
```yaml
82+
cardano-db-sync:
83+
image: inputoutput/cardano-db-sync:13.0.5
84+
...
85+
working_dir: /var/lib/cexplorer
86+
volumes:
87+
- db-sync-data:/var/lib/cexplorer
88+
- node-ipc:/node-ipc
89+
restart: on-failure
90+
...
91+
```
92+
After starting `docker-compose` the snapshot file should be downloaded to specified directory
93+
which exact location can be found by using `docker volume inspect` command:
94+
95+
```sh
96+
docker volume inspect cardano-db-sync_db-sync-data
97+
[
98+
{
99+
"CreatedAt": "2022-11-08T12:44:55+01:00",
100+
"Driver": "local",
101+
"Labels": {
102+
"com.docker.compose.project": "cardano-db-sync",
103+
"com.docker.compose.version": "1.29.2",
104+
"com.docker.compose.volume": "db-sync-data"
105+
},
106+
"Mountpoint": "/var/snap/docker/common/var-lib-docker/volumes/cardano-db-sync_db-sync-data/_data",
107+
"Name": "cardano-db-sync_db-sync-data",
108+
"Options": null,
109+
"Scope": "local"
110+
}
111+
]
112+
```
113+
114+
for `docker` use `--workdir=`.
115+
75116
## Disable options
76117

77118
Consult the configuration [docs](docs/configuration.md) for what these options mean, assuming you have read that

0 commit comments

Comments
 (0)