1
0
mirror of https://github.com/oceanprotocol/barge.git synced 2024-12-02 05:57:21 +01:00

Merge pull request #135 from oceanprotocol/tmarble/create-config.toml-template

Resets secret store config on startup
This commit is contained in:
Javier Cortejoso 2019-03-29 15:02:28 +01:00 committed by GitHub
commit 0eabdd1ccc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 2 deletions

14
.gitignore vendored
View File

@ -1,5 +1,17 @@
.idea/
# Project specific
artifacts/
ganache-db/
# IDE side effects
.idea/
# Emacs
*~
# mutable secret store config (Issue #126)
networks/secret-store/config/config.toml
# Mac OS Filesystem artifacts
.DS_Store
**/.DS_Store
._*

View File

@ -74,6 +74,14 @@ function show_banner {
echo ""
}
function configure_secret_store {
# restore default secret store config (Issue #126)
if [ -e "$DIR/networks/secret-store/config/config.toml.save" ]; then
cp "$DIR/networks/secret-store/config/config.toml.save" \
"$DIR/networks/secret-store/config/config.toml"
fi
}
function check_if_owned_by_root {
if [ -d "$OCEAN_HOME" ]; then
uid=$(ls -nd "$OCEAN_HOME" | awk '{print $3;}')
@ -256,6 +264,7 @@ while :; do
;;
*)
printf $COLOR_Y'Starting Ocean...\n\n'$COLOR_RESET
configure_secret_store
[ ! -z ${NODE_COMPOSE_FILE} ] && COMPOSE_FILES+=" -f ${NODE_COMPOSE_FILE}"
[ ${FORCEPULL} = "true" ] && docker-compose $DOCKER_COMPOSE_EXTRA_OPTS --project-name=$PROJECT_NAME $COMPOSE_FILES pull
eval docker-compose $DOCKER_COMPOSE_EXTRA_OPTS --project-name=$PROJECT_NAME $COMPOSE_FILES up --remove-orphans
@ -263,4 +272,3 @@ while :; do
esac
shift
done