summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xacid/cyche-build20
1 files changed, 10 insertions, 10 deletions
diff --git a/acid/cyche-build b/acid/cyche-build
index 310a087..7f63117 100755
--- a/acid/cyche-build
+++ b/acid/cyche-build
@@ -27,18 +27,18 @@ cd "/services/$1"
if [ "$4" == "--self" ]; then
prev=$(cat '.git/previous_slug')
- [ -n "$prev" ] && prev="--project-name $prev"
-
- slug=$(echo -n "$1-"; tr -dc a-z </dev/urandom | head -c 12)
- next="--project-name $slug"
+ [ -z "$prev" ] && prev="$1"
+ name=$(echo -n "$1-"; tr -dc a-z </dev/urandom | head -c 12)
+else
+ name="$1"
fi
-docker compose $next --file "$2" pull
-docker compose $next --file "$2" build \
+docker compose --project-name "$name" --file "$2" pull
+docker compose --project-name "$name" --file "$2" build \
--force-rm \
--no-cache \
--pull
-docker compose $next --file "$2" up \
+docker compose --project-name "$name" --file "$2" up \
--detach \
--remove-orphans \
--force-recreate
@@ -46,7 +46,7 @@ docker compose $next --file "$2" up \
echo "$3" >.git/previous_hash
if [ "$4" == "--self" ]; then
- echo "$slug" >.git/previous_slug
- docker compose --file "$2" down
- docker compose $prev --file "$2" down
+ echo "$name" >.git/previous_slug
+ docker compose --project-name "$1" down
+ docker compose --project-name "$prev" down
fi