Skip to content

Commit

Permalink
Set watchtower to update/watch only shadowbox container (Jigsaw-Code#540
Browse files Browse the repository at this point in the history
)
  • Loading branch information
tanelpuhu authored Jan 31, 2020
1 parent 9791f4d commit 8f90acf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/server_manager/install_scripts/install_server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ function start_shadowbox() {
# rather than pass in the environment.
declare -a docker_shadowbox_flags=(
--name shadowbox --restart=always --net=host
--label=com.centurylinklabs.watchtower.enable=true
-v "${STATE_DIR}:${STATE_DIR}"
-e "SB_STATE_DIR=${STATE_DIR}"
-e "SB_API_PORT=${API_PORT}"
Expand Down Expand Up @@ -295,7 +296,7 @@ function start_watchtower() {
docker_watchtower_flags+=(-v /var/run/docker.sock:/var/run/docker.sock)
# By itself, local messes up the return code.
local readonly STDERR_OUTPUT
STDERR_OUTPUT=$(docker run -d "${docker_watchtower_flags[@]}" containrrr/watchtower --cleanup --tlsverify --interval $WATCHTOWER_REFRESH_SECONDS 2>&1 >/dev/null)
STDERR_OUTPUT=$(docker run -d "${docker_watchtower_flags[@]}" containrrr/watchtower --cleanup --label-enable --tlsverify --interval $WATCHTOWER_REFRESH_SECONDS 2>&1 >/dev/null)
local readonly RET=$?
if [[ $RET -eq 0 ]]; then
return 0
Expand Down

0 comments on commit 8f90acf

Please sign in to comment.