From a98ba4e093ab52f3cb9d8e4f95a2e5b4db0cd117 Mon Sep 17 00:00:00 2001 From: Joosep Alviste Date: Sun, 24 Sep 2023 20:12:27 +0300 Subject: [PATCH] ci: fix deployment Apparently, specifying version as 3 is not enough for Docker Compose to understand the `target` attribute. Also, we can use `docker compose` instead of `docker-compose` in the deployment script. https://www.github.com/docker/compose/issues/5714#issuecomment-368434234 --- bin/update-deployment.sh | 6 +++--- docker-compose.production.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/update-deployment.sh b/bin/update-deployment.sh index 9ac232b4..90663aa1 100755 --- a/bin/update-deployment.sh +++ b/bin/update-deployment.sh @@ -18,11 +18,11 @@ cd ~/projects/serieslist git pull echo "Pulling images..." -docker-compose -f docker-compose.production.yml pull +docker compose -f docker-compose.production.yml pull echo "Starting containers..." -docker-compose -f docker-compose.production.yml up -d +docker compose -f docker-compose.production.yml up -d echo "Migrating database..." -docker-compose -f docker-compose.production.yml exec api pnpm migrate:prod +docker compose -f docker-compose.production.yml exec api pnpm migrate:prod ENDSSH echo "Project deployed!" diff --git a/docker-compose.production.yml b/docker-compose.production.yml index 1462f137..3db2a83f 100644 --- a/docker-compose.production.yml +++ b/docker-compose.production.yml @@ -1,4 +1,4 @@ -version: '3' +version: '3.4' services: api: