Skip to content

Commit 70c70fe

Browse files
authored
This time I actually tested it first (#238)
1 parent a771d92 commit 70c70fe

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

scripts/deploy-cron.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
# Licensed under https://creativecommons.org/licenses/by/4.0/
55

66
cd /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

scripts/deploy.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff 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
3535
elif [ $REMOTE = $BASE ]; then
3636
echo "$(date --utc +%FT%TZ): Local changes detected, you may need to stash"
3737
else

0 commit comments

Comments
 (0)