Skip to content

Commit abb65bf

Browse files
authored
Merge pull request #12234 from cdrini/feature/tweak-restart-servers
Add DOCKER_COMPOSE_COMMAND option to restart_servers.sh
2 parents a127ed8 + 80bace4 commit abb65bf

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

scripts/deployment/restart_servers.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ set -e
1212
# https://docs.openlibrary.org/advanced/deployment-scratchpad.html
1313

1414
PRODUCTION="compose.yaml:compose.production.yaml"
15-
# zsh uses HOST (although we're in a bash context, so maybe not needed?)
16-
HOSTNAME="${HOSTNAME:-$HOST}"
1715
OLIMAGE="${OLIMAGE:-}"
16+
DOCKER_COMPOSE_COMMAND=${DOCKER_COMPOSE_COMMAND:-"up --no-deps -d"}
1817

1918
SERVER_SUFFIX=${SERVER_SUFFIX:-""}
2019
# Note the order matters; we generally want ol-www0 done before the web heads,
@@ -30,6 +29,6 @@ for SERVER in $SERVERS; do
3029
set -e
3130
HOSTNAME=\$(host $SERVER | cut -d ' ' -f 1)
3231
cd /opt/openlibrary
33-
COMPOSE_FILE=$PRODUCTION HOSTNAME=\$HOSTNAME OLIMAGE=$OLIMAGE docker compose --profile $(echo $SERVER | cut -f1 -d '.') up --no-deps -d
32+
COMPOSE_FILE=$PRODUCTION HOSTNAME=\$HOSTNAME OLIMAGE=$OLIMAGE docker compose --profile $(echo $SERVER | cut -f1 -d '.') $DOCKER_COMPOSE_COMMAND
3433
"
3534
done

0 commit comments

Comments
 (0)