Skip to content

Commit

Permalink
ci: fix deployment
Browse files Browse the repository at this point in the history
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
  • Loading branch information
JoosepAlviste committed Sep 24, 2023
1 parent 1efb3e8 commit a98ba4e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions bin/update-deployment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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!"
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.production.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '3'
version: '3.4'

services:
api:
Expand Down

0 comments on commit a98ba4e

Please sign in to comment.