From 261b39f2e3a035263887cb0cf772c863f84b7d05 Mon Sep 17 00:00:00 2001 From: Robert Dailey Date: Mon, 29 Apr 2024 16:17:51 -0500 Subject: [PATCH] chore: Better support scripts for docker workflows --- docker/Debug.ps1 | 9 +++++++++ docker/{DockerRun.ps1 => Recyclarr.ps1} | 6 +----- 2 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 docker/Debug.ps1 rename docker/{DockerRun.ps1 => Recyclarr.ps1} (62%) diff --git a/docker/Debug.ps1 b/docker/Debug.ps1 new file mode 100644 index 00000000..e712f661 --- /dev/null +++ b/docker/Debug.ps1 @@ -0,0 +1,9 @@ +$ErrorActionPreference = "Stop" + +$debuggingYaml = "$PSScriptRoot/debugging/docker-compose.yml" + +# Start the corresponding radarr/sonarr docker containers for testing/debugging +docker compose -f $debuggingYaml up -d --pull always +if ($LASTEXITCODE -ne 0) { + throw "docker compose up failed" +} diff --git a/docker/DockerRun.ps1 b/docker/Recyclarr.ps1 similarity index 62% rename from docker/DockerRun.ps1 rename to docker/Recyclarr.ps1 index ff7abb69..871c6190 100644 --- a/docker/DockerRun.ps1 +++ b/docker/Recyclarr.ps1 @@ -1,13 +1,9 @@ $ErrorActionPreference = "Stop" -$debuggingYaml = "$PSScriptRoot/debugging/docker-compose.yml" $recyclarrYaml = "$PSScriptRoot/../docker-compose.yml" # Start the corresponding radarr/sonarr docker containers for testing/debugging -docker compose -f $debuggingYaml up -d --pull always -if ($LASTEXITCODE -ne 0) { - throw "docker compose up failed" -} +& $PSScriptRoot/Debug.ps1 docker compose -f $recyclarrYaml run --rm --build app @args if ($LASTEXITCODE -ne 0) {