Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,18 @@ jobs:
set -e
cd /home/ubuntu/deare

ENV_FILE=/home/ubuntu/deare/.env.prod
COMPOSE_FILE=/home/ubuntu/deare/docker-compose-dev.yml

docker-compose -f $COMPOSE_FILE pull app
docker-compose --env-file $ENV_FILE -f $COMPOSE_FILE pull app

if docker-compose -f $COMPOSE_FILE up -d; then
if docker-compose --env-file $ENV_FILE -f $COMPOSE_FILE up -d; then
echo "compose up succeeded without down"
else
echo "compose up failed. fallback to down -> up"
docker-compose -f $COMPOSE_FILE down
docker-compose -f $COMPOSE_FILE up -d
docker-compose --env-file $ENV_FILE -f $COMPOSE_FILE down
docker-compose --env-file $ENV_FILE -f $COMPOSE_FILE up -d
fi

docker-compose -f $COMPOSE_FILE ps
docker-compose --env-file $ENV_FILE -f $COMPOSE_FILE ps
docker image prune -f
Loading