Skip to content

Instantly share code, notes, and snippets.

@serge-medvedev
Created May 5, 2022 15:05
Show Gist options
  • Select an option

  • Save serge-medvedev/7bc0606c78150f5b1eea5a7d525e8859 to your computer and use it in GitHub Desktop.

Select an option

Save serge-medvedev/7bc0606c78150f5b1eea5a7d525e8859 to your computer and use it in GitHub Desktop.
#!/bin/bash
RESTORE_DB=${RESTORE_DB:-false}
jq ".restore_db = ${RESTORE_DB}" /mnt/node/config.json > /tmp/config.json
mv /tmp/config.json /mnt/node/config.json
@serge-medvedev
Copy link
Author

Look for exact node config volume name via the command below (jq must be installed):

$ docker inspect -f '{{ json .Mounts }}' $(docker ps -q -f 'name=node') | jq -r '.[].Name | select(test("node-config"))'

@BitLox
Copy link

BitLox commented May 14, 2022

should probably add that when you grab the restore_db.sh one should make it executable:
chmod 775 restore_db.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment