File tree Expand file tree Collapse file tree 4 files changed +23
-9
lines changed Expand file tree Collapse file tree 4 files changed +23
-9
lines changed Original file line number Diff line number Diff line change @@ -150,10 +150,11 @@ for `docker` use `--workdir=`.
150
150
151
151
Consult the configuration [ docs] ( docs/configuration.md ) for what these options mean, assuming you have read that
152
152
they can be accessed via env variables passed to docker-compose. Leave out any that do not make sense, eg if
153
- you just want to disable the ledger use ` EXTRA_DB_SYNC_ARGS=--disable-ledger docker-compose up` .
153
+ you just want to disable the ledger use ` DISABLE_LEDGER=Y docker-compose up` .
154
154
155
155
``` shell
156
- EXTRA_DB_SYNC_ARGS=" --disable-ledger --disable-cache --disable-epoch" \
156
+ DISABLE_LEDGER=Y \
157
+ EXTRA_DB_SYNC_ARGS=" --disable-cache --disable-epoch" \
157
158
docker-compose up
158
159
```
159
160
Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ services:
55
55
cardano-db-sync :
56
56
image : inputoutput/cardano-db-sync:13.1.1.2
57
57
environment :
58
+ - DISABLE_LEDGER=${DISABLE_LEDGER}
58
59
- NETWORK=${NETWORK:-mainnet}
59
60
- POSTGRES_HOST=postgres
60
61
- POSTGRES_PORT=5432
Original file line number Diff line number Diff line change 136
136
set -euo pipefail
137
137
${ scripts . mainnet . db-sync . passthru . service . restoreSnapshotScript }
138
138
139
- exec $DBSYNC \
140
- --schema-dir ${ ../schema } \
141
- --state-dir ${ scripts . mainnet . db-sync . passthru . service . stateDir } $@
139
+ if [[ "'' ${DISABLE_LEDGER:-N}" == "Y" ]]; then
140
+ LEDGER_OPTS="--disable-ledger"
141
+ else
142
+ LEDGER_OPTS="--state-dir ${ scripts . mainnet . db-sync . passthru . service . stateDir } "
143
+ fi
144
+
145
+ exec $DBSYNC --schema-dir ${ ../schema } '' ${LEDGER_OPTS} $@
142
146
${ clusterStatements }
143
147
else
144
148
echo "Managed configuration for network "$NETWORK" does not exist"
Original file line number Diff line number Diff line change @@ -186,14 +186,18 @@ in {
186
186
then "--mainnet"
187
187
else "--testnet-magic $(jq '.networkMagic' ${ cfg . environment . nodeConfig . ShelleyGenesisFile } )" ) ;
188
188
dbSyncCommand = ''
189
+ if [[ "'' ${DISABLE_LEDGER:-N}" == "Y" ]]; then
190
+ LEDGER_OPTS="--disable-ledger"
191
+ else
192
+ LEDGER_OPTS="--state-dir ${ cfg . stateDir } "
193
+ fi
194
+
189
195
exec ${ exec } \
190
196
--config ${ configFile } \
191
197
--socket-path "$CARDANO_NODE_SOCKET_PATH" \
192
198
--schema-dir ${ self . schema } \
193
- ${ if cfg . disableLedger then
194
- "--disable-ledger"
195
- else
196
- "--state-dir ${ cfg . stateDir } " }
199
+ '' ${LEDGER_OPTS} \
200
+ '' ${EXTRA_DB_SYNC_ARGS:-}
197
201
'' ;
198
202
in {
199
203
pgpass = builtins . toFile "pgpass" "${ cfg . postgres . socketdir } :${
@@ -216,6 +220,10 @@ in {
216
220
export PGPASSFILE=$(pwd)/pgpass
217
221
'' }
218
222
223
+ ${ if ( cfg . disableLedger ) then
224
+ "export DISABLE_LEDGER=Y"
225
+ else "" }
226
+
219
227
${ cfg . restoreSnapshotScript }
220
228
221
229
if [[ -n "'' ${WAIT_FOR_NODE_SYNC:-}" ]]
You can’t perform that action at this time.
0 commit comments