refactor: healthcheck and deployment script adjustments

This commit is contained in:
17ms 2024-07-11 20:12:56 +03:00
parent a185b76393
commit f4df43f3a1
Signed by untrusted user who does not match committer: ae
GPG Key ID: 995EFD5C1B532B3E
2 changed files with 5 additions and 2 deletions

View File

@ -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

View File

@ -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