backup/restore: use MONGO_SERVICE variable for service name
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# Configuration
|
||||
MONGO_SERVICE="utility-bills-tracker_mongo"
|
||||
|
||||
# scale down mongo service while we copy its volume
|
||||
docker service scale utility-bills-tracker_mongo=0
|
||||
docker service scale "$MONGO_SERVICE"=0
|
||||
|
||||
# timestamp for filename
|
||||
TIMESTAMP=$(date +"%Y-%m-%d-%H-%M")
|
||||
@@ -30,4 +33,4 @@ if [ "$KEEP" -gt 0 ]; then
|
||||
fi
|
||||
|
||||
# bring mongo service back up
|
||||
docker service scale utility-bills-tracker_mongo=1
|
||||
docker service scale "$MONGO_SERVICE"=1
|
||||
|
||||
Reference in New Issue
Block a user