From 79af9ab73b83a5a66616425c6b9fba9e3f1a6134 Mon Sep 17 00:00:00 2001 From: Robert Dailey Date: Thu, 4 Apr 2024 19:06:30 -0500 Subject: [PATCH] wip --- BuildAndRun.ps1 | 34 +++++++++++++ docker/Dockerfile => Dockerfile | 4 +- .../certs/self-signed-cert-for-radarr.pfx | Bin 5133 -> 0 bytes .../docker-compose.yml => docker-compose.yml | 6 ++- docker/BuildAndRun.ps1 | 48 ------------------ .../debugging}/certs/cert-passwords.txt | 0 .../debugging}/docker-compose.yml | 0 7 files changed, 40 insertions(+), 52 deletions(-) create mode 100644 BuildAndRun.ps1 rename docker/Dockerfile => Dockerfile (87%) delete mode 100644 debugging/certs/self-signed-cert-for-radarr.pfx rename docker/docker-compose.yml => docker-compose.yml (86%) delete mode 100644 docker/BuildAndRun.ps1 rename {debugging => docker/debugging}/certs/cert-passwords.txt (100%) rename {debugging => docker/debugging}/docker-compose.yml (100%) diff --git a/BuildAndRun.ps1 b/BuildAndRun.ps1 new file mode 100644 index 00000000..912bcb1c --- /dev/null +++ b/BuildAndRun.ps1 @@ -0,0 +1,34 @@ +[CmdletBinding()] +param ( + [string] $Runtime = "linux-musl-x64", + [string[]] $RunArgs +) + +$ErrorActionPreference = "Stop" + +$artifactsDir = "$PSScriptRoot\docker\artifacts" + +# Delete old build artifacts +Remove-Item $artifactsDir -Recurse -Force -ErrorAction SilentlyContinue + +# Publish new build artifacts +& .\ci\Publish.ps1 -NoSingleFile ` + -OutputDir "$artifactsDir\$Runtime" ` + -Runtime $Runtime + +# Start the corresponding radarr/sonarr docker containers for testing/debugging +Push-Location "$PSScriptRoot\docker\debugging" +try { + docker compose up -d --pull always + if ($LASTEXITCODE -ne 0) { + throw "failed to bring up services stack" + } +} +finally { + Pop-Location +} + +docker compose run --rm --build app @RunArgs +if ($LASTEXITCODE -ne 0) { + throw "docker compose run failed" +} diff --git a/docker/Dockerfile b/Dockerfile similarity index 87% rename from docker/Dockerfile rename to Dockerfile index baa6fa04..bcd19f0b 100644 --- a/docker/Dockerfile +++ b/Dockerfile @@ -22,8 +22,8 @@ RUN set -ex; \ apk add --no-cache bash tzdata supercronic git tini; \ mkdir -p /config && chown 1000:1000 /config; -COPY ./artifacts/$RUNTIME /app/recyclarr/ -COPY --chmod=555 ./scripts/prod/*.sh / +COPY ./docker/artifacts/$RUNTIME /app/recyclarr/ +COPY --chmod=555 ./docker/scripts/prod/*.sh / USER 1000:1000 VOLUME /config diff --git a/debugging/certs/self-signed-cert-for-radarr.pfx b/debugging/certs/self-signed-cert-for-radarr.pfx deleted file mode 100644 index e3930bff7a272123f51dc8902882737798b62417..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5133 zcma)A2T&B-ww)PrmMkzZGXfIT0Y{?b43ZHgv6^8;+zQ0s(R0Na{{}BJL2ykP|W>0Wb|o zU5$&RF2~Zva3m?@e}qVH;UY;%u{0qZiBF18@~3J63nfQ!VPz|ot}PU*__W zS=M5>Xij6l_xCk))p%&7U`YN>tgEWQ(B=d7Hz9-X+8xZxBh1Iu@Q#rz1fmg14B@(# z*PzPQM`7TE+QhGcUAmJ0AAIUbq*CKJ@vC}^4@l!Pj z;km7O?7s`|33Fl6a&x2*Xun2<>$^{mO=p$O@H&2K36QEaql0L|{d~I|JR8kLvO%ko z!iD@D+EKfGK4!1SwuW{?X3~6gWb?d>~+4hG?kx7#)G8rGf*O}cX zZeltcf4f8;M$GpGyw&}dgcXNaJUH@A-#davXtKh^)A7s1e*5WQ^LVdTZ@6+x`-_B~ zV8YLAH1xx|-VaDDQIY>BZm zC0A;v@AFnZd(TO6F=D(ioWbtEv3AVu-8tEKBGXTKZNIFb^HL7KHv4CFGx*^d3JYkN zAM`j?j>Y-4d6_?DO$IRso2JA=v|ES^45Q0yyP}+eD&BZEaq1}6%Z%IWX1b&HA*CwL z7j(^y6*JToF(@u7t z_x+r%Z!MIg2SuJ=Cr$euH?DC)OTHDHLL@}ya!JJTib%3Y+WLET0;*-L_K1+r6^~eG zVg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