From ad586210b292cabc28c8b6368de062a4de82c913 Mon Sep 17 00:00:00 2001 From: todd Date: Thu, 22 Dec 2022 15:06:46 -0500 Subject: [PATCH 1/4] enh: docker/build enhancements, support arm64/v8 ver: 3.1 --- .github/workflows/beta.yml | 2 +- .github/workflows/pre-release.yml | 2 +- .github/workflows/release.yml | 2 +- Dockerfile | 8 ++------ searcharr.py | 2 +- 5 files changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/workflows/beta.yml b/.github/workflows/beta.yml index a4a1eb0..942683f 100644 --- a/.github/workflows/beta.yml +++ b/.github/workflows/beta.yml @@ -25,6 +25,6 @@ jobs: name: Build and push uses: docker/build-push-action@v3 with: - platforms: linux/amd64,linux/arm64,linux/arm/v7 + platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm64/v8 push: true tags: toddrob/searcharr:beta diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index 7adc81e..ba50aaa 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -28,6 +28,6 @@ jobs: name: Build and push uses: docker/build-push-action@v3 with: - platforms: linux/amd64,linux/arm64,linux/arm/v7 + platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm64/v8 push: true tags: toddrob/searcharr:${{steps.get_version.outputs.version}} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 02a4716..a80ce61 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,6 +28,6 @@ jobs: name: Build and push uses: docker/build-push-action@v3 with: - platforms: linux/amd64,linux/arm64,linux/arm/v7 + platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm64/v8 push: true tags: toddrob/searcharr:${{steps.get_version.outputs.version}},toddrob/searcharr:v${{steps.get_version.outputs.major}},toddrob/searcharr:latest diff --git a/Dockerfile b/Dockerfile index c569c68..9fd31c8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,11 @@ -FROM python:3.9-alpine +FROM python:3.11-slim-buster -LABEL Name=Searcharr Version=1.1 +LABEL Name=Searcharr Version=1.2 WORKDIR /app ADD . /app -RUN apk add --no-cache --virtual .build-deps gcc musl-dev libffi-dev openssl-dev python3-dev rust cargo - RUN python3 -m pip install --upgrade pip RUN python3 -m pip install -r requirements.txt -RUN apk del .build-deps gcc musl-dev libffi-dev openssl-dev python3-dev rust cargo - CMD ["python3", "searcharr.py"] diff --git a/searcharr.py b/searcharr.py index ff48302..ab61b07 100644 --- a/searcharr.py +++ b/searcharr.py @@ -24,7 +24,7 @@ import readarr import settings -__version__ = "3.0" +__version__ = "3.1" DBPATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), "data") DBFILE = "searcharr.db" From 0611e3fa7c84258b37b56c88d8e0183d42428bce Mon Sep 17 00:00:00 2001 From: todd Date: Thu, 22 Dec 2022 15:10:23 -0500 Subject: [PATCH 2/4] remove linux/arm64/v8 from build due to error --- .github/workflows/beta.yml | 2 +- .github/workflows/pre-release.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/beta.yml b/.github/workflows/beta.yml index 942683f..a4a1eb0 100644 --- a/.github/workflows/beta.yml +++ b/.github/workflows/beta.yml @@ -25,6 +25,6 @@ jobs: name: Build and push uses: docker/build-push-action@v3 with: - platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm64/v8 + platforms: linux/amd64,linux/arm64,linux/arm/v7 push: true tags: toddrob/searcharr:beta diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index ba50aaa..7adc81e 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -28,6 +28,6 @@ jobs: name: Build and push uses: docker/build-push-action@v3 with: - platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm64/v8 + platforms: linux/amd64,linux/arm64,linux/arm/v7 push: true tags: toddrob/searcharr:${{steps.get_version.outputs.version}} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a80ce61..02a4716 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,6 +28,6 @@ jobs: name: Build and push uses: docker/build-push-action@v3 with: - platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm64/v8 + platforms: linux/amd64,linux/arm64,linux/arm/v7 push: true tags: toddrob/searcharr:${{steps.get_version.outputs.version}},toddrob/searcharr:v${{steps.get_version.outputs.major}},toddrob/searcharr:latest From e4113e146b06cc8db60c6b0f5bc20674a6fd2f91 Mon Sep 17 00:00:00 2001 From: todd Date: Fri, 13 Jan 2023 15:10:08 -0500 Subject: [PATCH 3/4] fix: French translation caused error fix: pin python-telegram-bot to v13.15 fix: logging.handlers error ver: 3.2 --- lang/fr-fr.yml | 2 +- log.py | 3 ++- requirements.txt | 2 +- searcharr.py | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lang/fr-fr.yml b/lang/fr-fr.yml index 833a2c1..9a3a71d 100644 --- a/lang/fr-fr.yml +++ b/lang/fr-fr.yml @@ -30,7 +30,7 @@ no_language_profiles: "Erreur lors de l'ajout {kind} : aucun profil de langue ac all_seasons: Toutes saisons first_season: Première saison latest_season: Dernière saison -added: On a réussi à ajouter {titre} ! +added: On a réussi à ajouter {title} ! unknown_error_adding: Une erreur non spécifiée a été rencontrée lors de l'ajout de {kind} ! removed_user: Tous les accès de l'utilisateur ID [{user}] ont été supprimés avec succès ! unknown_error_removing_user: Erreur non spécifiée rencontrée lors de la suppression de l'identifiant de l'utilisateur [{user}] ! diff --git a/log.py b/log.py index 0f14ae1..554f8db 100644 --- a/log.py +++ b/log.py @@ -6,6 +6,7 @@ https://github.com/toddrob99/searcharr """ import logging +from logging.handlers import TimedRotatingFileHandler import os @@ -30,7 +31,7 @@ def set_up_logger(logger_name, verbose, console): logPath = os.path.join(os.path.dirname(os.path.realpath(__file__)), "logs") if not os.path.exists(logPath): os.makedirs(logPath) - fh = logging.handlers.TimedRotatingFileHandler( + fh = TimedRotatingFileHandler( os.path.join(logPath, fileName), when="midnight", interval=1, backupCount=7 ) fh.setFormatter(formatter) diff --git a/requirements.txt b/requirements.txt index eb64d0d..3e93c1d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ argparse requests -python-telegram-bot +python-telegram-bot==13.15 pyyaml arrow diff --git a/searcharr.py b/searcharr.py index ab61b07..35411d9 100644 --- a/searcharr.py +++ b/searcharr.py @@ -24,7 +24,7 @@ import readarr import settings -__version__ = "3.1" +__version__ = "3.2" DBPATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), "data") DBFILE = "searcharr.db" From 378597564270e6d184e6c1134a1a388fa18fff49 Mon Sep 17 00:00:00 2001 From: todd Date: Fri, 13 Jan 2023 15:14:47 -0500 Subject: [PATCH 4/4] enh: use slim distro --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 9fd31c8..2091caf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.11-slim-buster +FROM python:3.11-slim LABEL Name=Searcharr Version=1.2