version: '3' includes: common: taskfile: ./common.yml internal: true dir: .. vars: AVAILABLE_SERVICES: bitwarden drone drone-runner echo gitea nextcloud proxy minecraft COMPOSE_FILES: sh: find ./services -iname docker-compose.yml COMPOSE_ARGS: -f services/docker-compose.yml -f {{.COMPOSE_FILES | splitLines | join " -f "}} COMPOSE: '{{coalesce .COMPOSE_CMD "podman-compose"}}' tasks: pull: desc: Pull latest docker images cmds: - "{{.COMPOSE}} {{.COMPOSE_ARGS}} pull {{coalesce .CLI_ARGS .AVAILABLE_SERVICES}}" build: desc: Build latest docker images (if applicable) cmds: - "{{.COMPOSE}} {{.COMPOSE_ARGS}} build {{coalesce .CLI_ARGS .AVAILABLE_SERVICES}}" up: desc: Deploy given or active services deps: - common:template cmds: - "{{.COMPOSE}} {{.COMPOSE_ARGS}} up -d {{coalesce .CLI_ARGS .AVAILABLE_SERVICES}}" restart: desc: Restart given or active services deps: - common:template cmds: - "{{.COMPOSE}} {{.COMPOSE_ARGS}} restart {{coalesce .CLI_ARGS .AVAILABLE_SERVICES}}" stop: desc: Stop given or all services cmds: - "{{.COMPOSE}} {{.COMPOSE_ARGS}} stop {{coalesce .CLI_ARGS .AVAILABLE_SERVICES}}" down: desc: Stop and remove all services cmds: - "{{.COMPOSE}} {{.COMPOSE_ARGS}} down" logs: desc: Tail logs of given or all services deps: - common:template cmds: - "{{.COMPOSE}} {{.COMPOSE_ARGS}} logs --tail=50 -f {{coalesce .CLI_ARGS .AVAILABLE_SERVICES}}" upgrade: desc: Pull and re-deploy active services cmds: - task: pull - task: up