From 854088cbdf043be93e13303277e788258ce3e5e6 Mon Sep 17 00:00:00 2001 From: "cl.st" Date: Mon, 6 Jan 2025 00:40:11 +0100 Subject: [PATCH] chore: update docker --- docker/Dockerfile.dev | 13 +++++++------ docker/Dockerfile.e2e | 4 ++-- docker/Dockerfile.prod | 4 ++-- docker/stages/Dockerfile.python | 7 +++++-- settings/.tiddl_config.json | 17 +++++++++++++++++ 5 files changed, 33 insertions(+), 12 deletions(-) create mode 100644 settings/.tiddl_config.json diff --git a/docker/Dockerfile.dev b/docker/Dockerfile.dev index d0932b19..16bd343a 100644 --- a/docker/Dockerfile.dev +++ b/docker/Dockerfile.dev @@ -1,4 +1,4 @@ -FROM ghcr.io/linuxserver/baseimage-alpine:3.18 +FROM ghcr.io/linuxserver/baseimage-alpine:3.21 WORKDIR /home/app/build ENV SHELL bash @@ -7,13 +7,14 @@ ENV NODE_ENV="${NODE_ENV}" ENV PYTHONUNBUFFERED=1 RUN apk update && apk upgrade +RUN apk add npm nodejs py-pip ffmpeg beets -RUN apk add git build-base curl npm nodejs python3 py3-pip ffmpeg -RUN ln -sf python3 /usr/bin/python +RUN mkdir -p $HOME/.venvs +RUN python3 -m venv $HOME/.venvs +RUN source $HOME/.venvs/bin/activate +ENV PATH="$HOME/.venvs/bin:$PATH" -RUN python3 -m pip install --force-reinstall -v "tiddl==1.8.3" - -RUN apk add beets +RUN python -m pip install "tiddl==1.9.3" requests ffmpeg mutagen RUN mkdir -p /home/app/standalone/shared/beets RUN touch /home/app/standalone/shared/beets/beets-library.blb diff --git a/docker/Dockerfile.e2e b/docker/Dockerfile.e2e index db002ab0..ccb440aa 100644 --- a/docker/Dockerfile.e2e +++ b/docker/Dockerfile.e2e @@ -2,7 +2,7 @@ ## BUILD APP -FROM alpine:3.18 AS app_builder +FROM alpine:3.21 AS app_builder INCLUDE docker/stages/Dockerfile.builder ## BUILD STANDALONE APP @@ -11,8 +11,8 @@ FROM mcr.microsoft.com/playwright:v1.49.0-jammy AS runner RUN apt-get upgrade && apt-get clean && apt-get update RUN apt-get install -y python3-pip beets +RUN python3 -m pip install "tiddl==1.9.3" -INCLUDE docker/stages/Dockerfile.python INCLUDE docker/stages/Dockerfile.runner ENTRYPOINT ["sh", "/home/app/standalone/docker/run-prod.sh"] diff --git a/docker/Dockerfile.prod b/docker/Dockerfile.prod index e03f29da..8d561a03 100644 --- a/docker/Dockerfile.prod +++ b/docker/Dockerfile.prod @@ -2,13 +2,13 @@ ## BUILD APP -FROM ghcr.io/linuxserver/baseimage-alpine:3.18 AS app_builder +FROM ghcr.io/linuxserver/baseimage-alpine:3.21 AS app_builder INCLUDE docker/stages/Dockerfile.builder ## BUILD STANDALONE APP -FROM ghcr.io/linuxserver/baseimage-alpine:3.18 AS runner +FROM ghcr.io/linuxserver/baseimage-alpine:3.21 AS runner RUN apk add npm nodejs py3-pip beets ffmpeg INCLUDE docker/stages/Dockerfile.python diff --git a/docker/stages/Dockerfile.python b/docker/stages/Dockerfile.python index 79667d36..6ccc35f6 100644 --- a/docker/stages/Dockerfile.python +++ b/docker/stages/Dockerfile.python @@ -3,9 +3,12 @@ WORKDIR /home/app/build ENV SHELL bash ENV PYTHONUNBUFFERED=1 -RUN ln -sf python3 /usr/bin/python +RUN mkdir -p $HOME/.venvs +RUN python3 -m venv $HOME/.venvs +RUN source $HOME/.venvs/bin/activate +ENV PATH="$HOME/.venvs/bin:$PATH" -RUN python3 -m pip install --force-reinstall -v "tiddl==1.8.3" +RUN python -m pip install "tiddl==1.9.3" requests ffmpeg mutagen RUN mkdir -p /home/app/standalone/shared/beets RUN touch /home/app/standalone/shared/beets/beets-library.blb \ No newline at end of file diff --git a/settings/.tiddl_config.json b/settings/.tiddl_config.json new file mode 100644 index 00000000..b7d8e0f8 --- /dev/null +++ b/settings/.tiddl_config.json @@ -0,0 +1,17 @@ +{ + "token": "", + "refresh_token": "", + "token_expires_at": 1736099136, + "settings": { + "download_path": "/home/app/standalone/download/incomplete", + "track_quality": "LOSSLESS", + "track_template": "{artist}/{album}/{title}", + "album_template": "{artist}/{album}/{title}", + "playlist_template": "{playlist}/{title}", + "file_extension": "" + }, + "user": { + "user_id": "192283714", + "country_code": "" + } +} \ No newline at end of file