Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(tautulli): add it! #152

Merged
merged 1 commit into from
Oct 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions apps/tautulli/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
FROM docker.io/library/python:3.12.7-alpine


LABEL dev.joryirving.image.target_platform=$TARGETPLATFORM

Check warning on line 4 in apps/tautulli/Dockerfile

View workflow job for this annotation

GitHub Actions / build-images / Build/Test tautulli (linux/amd64)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$TARGETPLATFORM' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/
LABEL dev.joryirving.image.target_architecture=$TARGETARCH

Check warning on line 5 in apps/tautulli/Dockerfile

View workflow job for this annotation

GitHub Actions / build-images / Build/Test tautulli (linux/amd64)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$TARGETARCH' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/
LABEL dev.joryirving.image.target_os=$TARGETOS

Check warning on line 6 in apps/tautulli/Dockerfile

View workflow job for this annotation

GitHub Actions / build-images / Build/Test tautulli (linux/amd64)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$TARGETOS' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/
LABEL org.opencontainers.image.source="https://github.com/Tautulli/Tautulli"

ARG TARGETOS
ARG TARGETARCH
ARG TARGETPLATFORM
ARG VERSION
ARG CHANNEL

ENV \
PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_ROOT_USER_ACTION=ignore \
PIP_NO_CACHE_DIR=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1 \
PIP_BREAK_SYSTEM_PACKAGES=1 \
CRYPTOGRAPHY_DONT_BUILD_RUST=1

ENV TAUTULLI_DOCKER="True"

ENV UMASK="0002" \
TZ="Etc/UTC"

USER root
WORKDIR /app

#hadolint ignore=DL3018,DL3013
RUN \
apk add --no-cache \
bash \
ca-certificates \
catatonit \
curl \
jo \
jq \
nano \
tzdata \
&& \
apk add --no-cache --virtual .build-deps \
build-base \
cargo \
libffi-dev \
musl-dev \
openssl-dev \
&& \
pip install uv \
&& \
uv pip install --system \
--requirement "https://raw.githubusercontent.com/Tautulli/tautulli-baseimage/python3/requirements.txt" \
&& \
mkdir -p /app \
&& \
curl -fsSL "https://github.com/Tautulli/Tautulli/archive/v${VERSION}.tar.gz" | tar xzf - -C /app --strip-components 1 \
&& \
echo "v${VERSION}" > /app/version.txt \
&& \
echo "${CHANNEL}" > /app/branch.txt \
&& chown -R root:root /app \
&& chmod -R 755 /app \
&& apk del --purge .build-deps \
&& rm -rf \
/root/.cache \
/root/.cargo \
/tmp/*

COPY ./entrypoint.sh /entrypoint.sh

ENTRYPOINT ["/usr/bin/catatonit", "--"]
CMD ["/entrypoint.sh"]

14 changes: 14 additions & 0 deletions apps/tautulli/ci/goss.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/goss-org/goss/master/docs/schema.yaml
process:
python:
running: true
port:
tcp:8181:
listening: true
http:
http://localhost:8181:
status: 200
file:
/usr/local/bin/python:
exists: true
5 changes: 5 additions & 0 deletions apps/tautulli/ci/latest.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
version=$(curl -sX GET "https://api.github.com/repos/Tautulli/Tautulli/releases/latest" | jq --raw-output '. | .tag_name' 2>/dev/null)
version="${version#*v}"
version="${version#*release-}"
printf "%s" "${version}"
10 changes: 10 additions & 0 deletions apps/tautulli/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

#shellcheck disable=SC2086
exec \
/usr/local/bin/python \
/app/Tautulli.py \
--nolaunch \
--config /config/config.ini \
--datadir /config \
"$@"
10 changes: 10 additions & 0 deletions apps/tautulli/metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
app: tautulli
semver: true
channels:
- name: master
platforms: ["linux/amd64", "linux/arm64"]
stable: true
tests:
enabled: true
type: web