From b4d5b540c3ef8d90b8f80660884ef31faa4c8056 Mon Sep 17 00:00:00 2001 From: Teck Meng Date: Tue, 4 Jun 2024 18:49:03 +0800 Subject: [PATCH] Refactor makefile to separate loadenvs command in deploy-test target --- makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/makefile b/makefile index bd9d954..3f4cecc 100644 --- a/makefile +++ b/makefile @@ -25,9 +25,13 @@ deploy-apps: pull docker stack deploy --compose-file ./swarm/apps.yml apps deploy-ghost: pull - @echo "Deploying the ghost stack..." - $(loadenvs ./swarm/.env) - docker stack deploy --compose-file ./swarm/ghost.yml ghost + { \ + @echo "Deploying the ghost stack..." ;\ + set -a ;\ + source ./swarm/.env ;\ + set +a ;\ + docker stack deploy --compose-file ./swarm/ghost.yml ghost ;\ + } deploy-test: pull @echo "Deploying the test stack..."