This commit is contained in:
pluja 2024-03-04 21:19:02 +01:00
parent dfe2fcbdc8
commit f371e4b4af

View File

@ -5,10 +5,9 @@ dev +command:
deploy build="": deploy build="":
git pull git pull
# Set variable for build option # Use shell scripting for conditional logic
{{ set build_option = if build != "" { "--build" } else { "" } }} BUILD_OPTION="{{ if build != "" { "--build" } else { "" } }}"
docker compose up {{ build_option }} --pull=always -d docker compose up $BUILD_OPTION --pull=always -d
# Set variable for restart command # Use shell scripting for conditional logic
{{ set restart_cmd = if build == "" { "docker compose restart website" } else { "" } }} if [ -z "{{ build }}" ]; then docker compose restart website; fi
{{ restart_cmd }}
docker system prune -f docker system prune -f