Skip to content

Commit e442803

Browse files
committed
feat: add decypharr
1 parent 9d3bd4f commit e442803

File tree

8 files changed

+157
-3
lines changed

8 files changed

+157
-3
lines changed

apps/decypharr/Dockerfile

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
FROM alpine AS cloner
2+
ARG VERSION
3+
RUN apk add --update --no-cache tmux ttyd git && \
4+
git clone -b $VERSION https://github.com/sirrobot01/decypharr.git /source
5+
6+
# Stage 1: Build binaries
7+
FROM --platform=$BUILDPLATFORM golang:1.24-alpine AS builder
8+
9+
ARG TARGETOS
10+
ARG TARGETARCH
11+
ARG VERSION=0.0.0
12+
ARG CHANNEL=dev
13+
14+
WORKDIR /app
15+
16+
COPY --from=cloner /source/go.mod /source/go.sum ./
17+
RUN --mount=type=cache,target=/go/pkg/mod \
18+
go mod download -x
19+
20+
COPY --from=cloner /source/. .
21+
22+
# Build main binary
23+
RUN --mount=type=cache,target=/go/pkg/mod \
24+
--mount=type=cache,target=/root/.cache/go-build \
25+
CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH \
26+
go build -trimpath \
27+
-ldflags="-w -s -X github.com/sirrobot01/decypharr/pkg/version.Version=${VERSION} -X github.com/sirrobot01/decypharr/pkg/version.Channel=${CHANNEL}" \
28+
-o /decypharr
29+
30+
# Build healthcheck (optimized)
31+
RUN --mount=type=cache,target=/go/pkg/mod \
32+
--mount=type=cache,target=/root/.cache/go-build \
33+
CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH \
34+
go build -trimpath -ldflags="-w -s" \
35+
-o /healthcheck cmd/healthcheck/main.go
36+
37+
# Stage 2: Create directory structure
38+
FROM alpine:3.19 as dirsetup
39+
RUN mkdir -p /app/logs && \
40+
mkdir -p /app/cache && \
41+
chmod 777 /app/logs && \
42+
touch /app/logs/decypharr.log && \
43+
chmod 666 /app/logs/decypharr.log
44+
45+
# Stage 3: Final image
46+
FROM ghcr.io/ipromknight/alpine:rolling
47+
48+
LABEL version = "${VERSION}-${CHANNEL}"
49+
LABEL org.opencontainers.image.source = "https://github.com/sirrobot01/decypharr"
50+
LABEL org.opencontainers.image.title = "decypharr"
51+
LABEL org.opencontainers.image.authors = "sirrobot01"
52+
LABEL org.opencontainers.image.documentation = "https://github.com/sirrobot01/decypharr/blob/main/README.md"
53+
54+
# Copy binaries
55+
COPY --from=builder --chown=568:568 /decypharr /usr/bin/decypharr
56+
COPY --from=builder --chown=568:568 /healthcheck /usr/bin/healthcheck
57+
58+
# Copy pre-made directory structure
59+
COPY --from=dirsetup --chown=568:568 /app /app
60+
61+
# Metadata
62+
ENV LOG_PATH=/config/logs
63+
EXPOSE 8282
64+
65+
USER 568
66+
67+
# So that the app will start for goss tests
68+
COPY --chown=568:568 apps/decypharr/config.json /config/
69+
70+
COPY --chmod=0755 apps/decypharr/promknight-entrypoint.sh /promknight-entrypoint.sh

apps/decypharr/ci/goss.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
# https://github.com/aelsabbahy/goss/blob/master/docs/manual.md#process
3+
process:
4+
decypharr:
5+
running: true
6+
7+
http:
8+
http://localhost:8282:
9+
status: 200

apps/decypharr/ci/latest.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env bash
2+
AUTH="Authorization: token ${GH_PAT:-${TOKEN:-}}"
3+
version=$(curl -sLf -H "$AUTH" https://api.github.com/repos/sirrobot01/decypharr/releases/latest | jq --raw-output '. | .tag_name')
4+
printf "%s" "${version}"

apps/decypharr/config.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"debrids": [
3+
{
4+
"name": "realdebrid",
5+
"host": "https://api.real-debrid.com/rest/1.0",
6+
"api_key": "realdebrid_key",
7+
"folder": "/tmp"
8+
}
9+
],
10+
"proxy": {
11+
"enabled": false,
12+
"port": "8100",
13+
"username": "username",
14+
"password": "password"
15+
},
16+
"qbittorrent": {
17+
"port": "8282",
18+
"download_folder": "/tmp",
19+
"categories": ["sonarr", "radarr"]
20+
},
21+
"repair": {
22+
"enabled": false,
23+
"interval": "12h",
24+
"run_on_start": false
25+
},
26+
"use_auth": false,
27+
"log_level": "info"
28+
}

apps/decypharr/metadata.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"app": "decypharr",
3+
"base": false,
4+
"channels": [
5+
{
6+
"name": "main",
7+
"platforms": [
8+
"linux/amd64"
9+
],
10+
"stable": true,
11+
"tests": {
12+
"enabled": true,
13+
"type": "web"
14+
}
15+
}
16+
]
17+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
cat << "EOF"
6+
7+
▐▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▌
8+
▐ ▌
9+
▐ ██▓███ ██▀███ ▒█████ ███▄ ▄███▓ ██ ▄█▀ ███▄ █ ██▓ ▄████ ██░ ██ ▄▄▄█████▓ ▌
10+
▐ ▓██░ ██▒▓██ ▒ ██▒▒██▒ ██▒▓██▒▀█▀ ██▒ ██▄█▒ ██ ▀█ █ ▓██▒ ██▒ ▀█▒▓██░ ██▒▓ ██▒ ▓▒ ▌
11+
▐ ▓██░ ██▓▒▓██ ░▄█ ▒▒██░ ██▒▓██ ▓██░▓███▄░ ▓██ ▀█ ██▒▒██▒▒██░▄▄▄░▒██▀▀██░▒ ▓██░ ▒░ ▌
12+
▐ ▒██▄█▓▒ ▒▒██▀▀█▄ ▒██ ██░▒██ ▒██ ▓██ █▄ ▓██▒ ▐▌██▒░██░░▓█ ██▓░▓█ ░██ ░ ▓██▓ ░ ▌
13+
▐ ▒██▒ ░ ░░██▓ ▒██▒░ ████▓▒░▒██▒ ░██▒▒██▒ █▄▒██░ ▓██░░██░░▒▓███▀▒░▓█▒░██▓ ▒██▒ ░ ▌
14+
▐ ▒▓▒░ ░ ░░ ▒▓ ░▒▓░░ ▒░▒░▒░ ░ ▒░ ░ ░▒ ▒▒ ▓▒░ ▒░ ▒ ▒ ░▓ ░▒ ▒ ▒ ░░▒░▒ ▒ ░░ ▌
15+
▐ ░▒ ░ ░▒ ░ ▒░ ░ ▒ ▒░ ░ ░ ░░ ░▒ ▒░░ ░░ ░ ▒░ ▒ ░ ░ ░ ▒ ░▒░ ░ ░ ▌
16+
▐ ░░ ░░ ░ ░ ░ ░ ▒ ░ ░ ░ ░░ ░ ░ ░ ░ ▒ ░░ ░ ░ ░ ░░ ░ ░ ▌
17+
▐ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ▌
18+
▐ ▌
19+
▐ Decypharr ▌
20+
▐▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▌
21+
22+
EOF
23+
24+
exec \
25+
/usr/bin/decypharr \
26+
--config /config

apps/jellyfin/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ghcr.io/ipromknight/ubuntu:rolling@sha256:7023b1419420f9cdb10f46c837fd80bf2b615f6aa273fdd82c45105b216fbdf1
1+
FROM ghcr.io/ipromknight/ubuntu:rolling
22

33
ARG TARGETPLATFORM
44
ARG BUILDPLATFORM

apps/sonarr/scripts/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ghcr.io/elfhosted/alpine:rolling@sha256:5074e62f9deeb6228a9b86c8f64eac139acfce8d2cb4db91668386c2dcbd7a98
1+
FROM ghcr.io/ipromknight/alpine:rolling
22

33
# for initial install
44
USER root
@@ -20,4 +20,4 @@ RUN chmod 755 /prepare-scripts.sh && /prepare-scripts.sh
2020

2121
# USER 568
2222

23-
ENTRYPOINT ["/init"] # set on test or in child images
23+
ENTRYPOINT ["/init"]

0 commit comments

Comments
 (0)