Robert Dailey 7 months ago
parent cf9eeec476
commit 79af9ab73b

@ -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"
}

@ -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

@ -1,10 +1,12 @@
name: recyclarr
networks:
recyclarr:
name: recyclarr_dev
external: true
services:
recyclarr:
app:
image: ghcr.io/recyclarr/recyclarr:edge
user: $DOCKER_UID:$DOCKER_GID
container_name: recyclarr
@ -14,7 +16,7 @@ services:
- TARGETARCH=amd64
networks: [recyclarr]
volumes:
- ./config:/config
- ./docker/config:/config
environment:
CRON_SCHEDULE: "* * * * *"
TZ: America/Chicago

@ -1,48 +0,0 @@
[CmdletBinding()]
param (
[string] $Runtime = "linux-musl-x64",
[string[]] $RunArgs
)
$ErrorActionPreference = "Stop"
$artifactsDir = "$PSScriptRoot\artifacts"
# Delete old build artifacts
Remove-Item $artifactsDir -Recurse -Force -ErrorAction SilentlyContinue
# Publish new build artifacts
Push-Location $PSScriptRoot\..
try {
& .\ci\Publish.ps1 -NoSingleFile `
-OutputDir "$artifactsDir\$Runtime" `
-Runtime $Runtime
}
finally {
Pop-Location
}
# Start the corresponding radarr/sonarr docker containers for testing/debugging
Push-Location "$PSScriptRoot\..\debugging"
try {
docker compose up -d --pull always
if ($LASTEXITCODE -ne 0) {
throw "docker compose up failed"
}
}
finally {
Pop-Location
}
# Finally, build the docker image and run it
docker compose build
if ($LASTEXITCODE -ne 0) {
throw "docker compose build failed"
}
# TODO: Use `--build` when it releases:
# https://github.com/docker/compose/issues/10003
docker compose run --rm recyclarr @RunArgs
if ($LASTEXITCODE -ne 0) {
throw "docker compose run failed"
}
Loading…
Cancel
Save