From 5afe91fcfb228bb26144ec379deb609961a6bcf7 Mon Sep 17 00:00:00 2001 From: Kamil Monicz Date: Wed, 3 Apr 2024 14:59:52 +0200 Subject: [PATCH] More robust docker restart, Mount migration data --- .github/workflows/deploy.yaml | 1 + docker-compose.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 2e914e8..1472314 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -104,6 +104,7 @@ jobs: git reset --hard "origin/$tag" echo "Restarting containers" + docker compose down --remove-orphans TAG="$tag" docker compose --env-file "envs/compose/$tag.env" up -d echo "Pruning dangling images" diff --git a/docker-compose.yml b/docker-compose.yml index 6ef21b3..b93a6dd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -23,5 +23,6 @@ services: - ${LISTEN:-80}:8000 volumes: + - ./.migrate.json:/app/.migrate.json - ./data/postgres:/app/data/postgres - /mnt/data/${TAG}/photos:/app/data/photos