Skip to content

Commit

Permalink
Allow to run Outline on a server with another Watchtower
Browse files Browse the repository at this point in the history
See https://containrrr.dev/watchtower/running-multiple-instances/

`com.centurylinklabs.watchtower.enable` and `--label-enable` are kept for backward compatibility.

Closes #48.
  • Loading branch information
AlekSi committed Dec 21, 2022
1 parent 8780b4b commit 57130f7
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 @@ -304,6 +304,7 @@ function start_shadowbox() {
local -ar docker_shadowbox_flags=(
--name "${CONTAINER_NAME}" --restart always --net host
--label 'com.centurylinklabs.watchtower.enable=true'
--label 'com.centurylinklabs.watchtower.scope=shadowbox'
-v "${STATE_DIR}:${STATE_DIR}"
-e "SB_STATE_DIR=${STATE_DIR}"
-e "SB_API_PORT=${API_PORT}"
Expand Down Expand Up @@ -336,7 +337,7 @@ function start_watchtower() {
-v /var/run/docker.sock:/var/run/docker.sock)
# By itself, local messes up the return code.
local STDERR_OUTPUT
STDERR_OUTPUT="$(docker run -d "${docker_watchtower_flags[@]}" containrrr/watchtower --cleanup --label-enable --tlsverify --interval "${WATCHTOWER_REFRESH_SECONDS}" 2>&1 >/dev/null)" && return
STDERR_OUTPUT="$(docker run -d "${docker_watchtower_flags[@]}" containrrr/watchtower --cleanup --label-enable --scope=shadowbox --tlsverify --interval "${WATCHTOWER_REFRESH_SECONDS}" 2>&1 >/dev/null)" && return
readonly STDERR_OUTPUT
log_error "FAILED"
if docker_container_exists watchtower; then
Expand Down

0 comments on commit 57130f7

Please sign in to comment.