diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 375f550..e89f41c 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -20,4 +20,4 @@ then fi echo -e "\n[+] Deploying the container with 'docker run' ('data' as the volume)..." -docker run -it -v ./data:/app/data --name chainmapper-prod -d chainmapper +docker run -it --restart unless-stopped -v ./data:/app/data --name chainmapper-prod -d chainmapper diff --git a/scripts/healthcheck.sh b/scripts/healthcheck.sh index 4c3cd4a..9a8d23b 100644 --- a/scripts/healthcheck.sh +++ b/scripts/healthcheck.sh @@ -2,8 +2,11 @@ # Included into the built image via its Dockerfile -if [ -s /app/chainmapper.sqlite3 ]; then +DB_FILE="/app/chainmapper.sqlite3" + +if [ -s $DB_FILE ]; then exit 0 else + echo "Database file not found" exit 1 fi