fix justfile

This commit is contained in:
pluja 2024-03-04 21:23:06 +01:00
parent f371e4b4af
commit 8bab61a86f

View File

@ -4,10 +4,16 @@ dev +command:
docker compose -f docker-compose.yml -f docker-compose.dev.yml {{command}}
deploy build="":
#!/bin/bash
git pull
# Use shell scripting for conditional logic
BUILD_OPTION="{{ if build != "" { "--build" } else { "" } }}"
docker compose up $BUILD_OPTION --pull=always -d
# Use shell scripting for conditional logic
if [ -z "{{ build }}" ]; then
build_flag=""
else
build_flag="--build"
fi
docker compose up --pull=always -d $build_flag
if [ -z "{{ build }}" ]; then docker compose restart website; fi
docker system prune -f