File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44# Licensed under https://creativecommons.org/licenses/by/4.0/
55
66cd /home/matthew/democrasite
7- flock -n " ~/build.lock" scripts/deploy.sh >> ~ /build.log 2>&1
7+ flock -n ~ /build.lock scripts/deploy.sh >> ~ /build.log 2>&1
Original file line number Diff line number Diff line change @@ -19,19 +19,19 @@ elif [ $LOCAL = $BASE ]; then
1919 BUILD_VERSION=$( git rev-parse HEAD)
2020 echo " #(date --utc +%FT%TZ): Releasing new server version. $BUILD_VERSION "
2121
22+ COMPOSE_FILE=" /home/matthew/democrasite/docker-compose.production.yml"
2223 echo " $( date --utc +%FT%TZ) : Running build..."
23- COMPOSE_FILE=/home/matthew/democrasite/docker-compose.production.yml
24- docker compose rm -f
25- docker compose build
24+ docker compose $COMPOSE_FILE rm -f
25+ docker compose $COMPOSE_FILE build
2626
2727 OLD_CONTAINER=$( docker ps -aqf " name=django" )
2828 echo " $( date --utc +%FT%TZ) : Scaling server up..."
29- BUILD_VERSION=$BUILD_VERSION docker compose up -d --no-deps --scale django=2 --no-recreate django
29+ BUILD_VERSION=$BUILD_VERSION docker compose $COMPOSE_FILE up -d --no-deps --scale django=2 --no-recreate django
3030
3131 sleep 30
3232
3333 echo " $( date --utc +%FT%TZ) : Scaling old server down..." docker container rm -f $OLD_CONTAINER
34- docker compose up -d --no-deps --scale django=1 --no-recreate django
34+ docker compose $COMPOSE_FILE up -d --no-deps --scale django=1 --no-recreate django
3535elif [ $REMOTE = $BASE ]; then
3636 echo " $( date --utc +%FT%TZ) : Local changes detected, you may need to stash"
3737else
You can’t perform that action at this time.
0 commit comments