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}} docker compose -f docker-compose.yml -f docker-compose.dev.yml {{command}}
deploy build="": deploy build="":
#!/bin/bash
git pull git pull
# Use shell scripting for conditional logic
BUILD_OPTION="{{ if build != "" { "--build" } else { "" } }}" if [ -z "{{ build }}" ]; then
docker compose up $BUILD_OPTION --pull=always -d build_flag=""
# Use shell scripting for conditional logic else
build_flag="--build"
fi
docker compose up --pull=always -d $build_flag
if [ -z "{{ build }}" ]; then docker compose restart website; fi if [ -z "{{ build }}" ]; then docker compose restart website; fi
docker system prune -f docker system prune -f