forked from swarmstack/swarmstack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
up
executable file
·24 lines (17 loc) · 762 Bytes
/
up
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
## Run this script to deploy or update stack containers when their config files have been changed
STACK=swarmstack
if uname | grep -q "Darwin"; then
mod_time_fmt="-f %m"
else
mod_time_fmt="-c %Y"
fi
export CONFALERTMANANGER=$(stat $mod_time_fmt alertmanager/conf/)
export CONFCADDY=$(stat $mod_time_fmt caddy/)
export CONFCADDYCERT=$(stat $mod_time_fmt caddy/caddycerts/)
export CONFDOCKERGC=$(stat $mod_time_fmt ./docker-gc-exclude)
export CONFGRAFANADASH=$(stat $mod_time_fmt grafana/dashboards/)
export CONFKARMA=$(stat $mod_time_fmt karma/)
export CONFPROM=$(stat $mod_time_fmt prometheus/conf/)
export CONFPROMRULES=$(stat $mod_time_fmt prometheus/rules/)
docker stack deploy --resolve-image always -c docker-compose.yml ${STACK}