Skip to content

Commit

Permalink
Ability to adjust IPFS max datastore (#717)
Browse files Browse the repository at this point in the history
  • Loading branch information
alabdao committed Oct 20, 2023
1 parent 673e78a commit c2fa8dd
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions docker/images/ipfs/container-init.d/006-datastore.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash
set -e

if [ "${IPFS_DEBUG}" == "true" ]; then
set -x
fi

if [ -n "${IPFS_DATASTORE_STORAGEMAX}" ]; then
ipfs config Datastore.StorageMax "${IPFS_DATASTORE_STORAGEMAX}"
fi

if [ -N "${IPFS_DATASTORE_STORAGEGCWATERMARK}" ]; then
ipfs config Datastore.StorageGCWatermark "${IPFS_DATASTORE_STORAGEGCWATERMARK}"
fi

if [ -n "${IPFS_DATASTORE_GCPERIOD}" ]; then
ipfs config Datastore.GCPeriod "${IPFS_DATASTORE_GCPERIOD}"
fi

0 comments on commit c2fa8dd

Please sign in to comment.