From dfe55becd6e48e99003424be7033b80acd3d1aa5 Mon Sep 17 00:00:00 2001 From: Joe Groocock Date: Thu, 24 Aug 2017 18:01:26 +0100 Subject: [PATCH 1/5] Update comment, removing legacy roots --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 06c3c36..5c0e801 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,7 @@ RUN wget http://ftp.de.debian.org/debian/pool/main/g/gcc-4.9/libstdc++6_4.9.2-10 && export PLEX_VER=$(wget -qO- https://adam-ant.co.uk/plex/version.php | sed -n 's/.*"release":\s*"\([^"]*\)".*/\1/p') \ && wget -O plexmediaserver.deb "https://downloads.plex.tv/plex-media-server/$PLEX_VER/plexmediaserver_"$PLEX_VER"_amd64.deb" \ && dpkg-deb -x plexmediaserver.deb . \ - # Move usr/lib and start_pms. Everything else is useless + # Move usr/lib/plexmediaserver. Everything else is useless && mv usr/lib/plexmediaserver /usr/lib \ && chmod +x /usr/sbin/start_pms \ && find /tmp -mindepth 1 -delete From e1505bd3651848aa40a65de3b358f9d2647b0ea5 Mon Sep 17 00:00:00 2001 From: Joe Groocock Date: Thu, 24 Aug 2017 18:10:07 +0100 Subject: [PATCH 2/5] Rebuild plexpass after a successful public release --- .drone.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.drone.yml b/.drone.yml index 96a7770..7f9fd32 100644 --- a/.drone.yml +++ b/.drone.yml @@ -45,3 +45,16 @@ pipeline: - docker login -u $DOCKER_USER -p $DOCKER_PASS - docker push adamant/plexmediaserver - echo "CONGRATS! SUCCESSFULLY BUILT PLEX VERSION "$CUR_VERSION + + downstream: + image: plugins/downstream + secrets: [ DOWNSTREAM_TOKEN ] + server: https://drone.adam-ant.co.uk + fork: true + repositories: + # A public release potentially means an + # updated plexpass release - update that too! + - Adam-Ant/docker-plex-tiny@pass + when: + event: [ push, tag, deployment ] + status: [ success ] From ee78c109bb33bf63e4580fbdbe4575cfe4483390 Mon Sep 17 00:00:00 2001 From: Joe Groocock Date: Thu, 24 Aug 2017 18:15:31 +0100 Subject: [PATCH 3/5] Print identified plex version to the logs --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 7f9fd32..d8c98d6 100644 --- a/.drone.yml +++ b/.drone.yml @@ -9,7 +9,7 @@ pipeline: commands: # Grab the current version, prevents race conditions #### Pass this into the Dockerfile somehow? - apk add --no-cache openssl jq - - wget -qO- https://adam-ant.co.uk/plex/version.php | jq -r .release> .plex_version + - wget -qO- https://adam-ant.co.uk/plex/version.php | tee /dev/stderr | jq -r .release > .plex_version build: image: docker From 69a9f53e64ed87eb5443ea6fd100a15c8d68c396 Mon Sep 17 00:00:00 2001 From: Joe Groocock Date: Thu, 24 Aug 2017 18:15:51 +0100 Subject: [PATCH 4/5] Fix .drone.yml formatting --- .drone.yml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.drone.yml b/.drone.yml index d8c98d6..5173061 100644 --- a/.drone.yml +++ b/.drone.yml @@ -7,21 +7,22 @@ pipeline: identify: image: docker commands: - # Grab the current version, prevents race conditions #### Pass this into the Dockerfile somehow? - - apk add --no-cache openssl jq - - wget -qO- https://adam-ant.co.uk/plex/version.php | tee /dev/stderr | jq -r .release > .plex_version + # Grab the current version, prevents race conditions + #### Pass this into the Dockerfile somehow? + - apk add --no-cache openssl jq + - wget -qO- https://adam-ant.co.uk/plex/version.php | tee /dev/stderr | jq -r .release > .plex_version build: image: docker environment: - - DOCKER_HOST=tcp://docker:2375 + - DOCKER_HOST=tcp://docker:2375 commands: - - docker build -t devbuild . + - docker build -t devbuild . test: image: docker environment: - - DOCKER_HOST=tcp://docker:2375 + - DOCKER_HOST=tcp://docker:2375 commands: - apk add --no-cache curl xmlstarlet grep - export CUR_VERSION="$(cat .plex_version)" @@ -29,7 +30,7 @@ pipeline: - sleep 10 # Wait for plex to start! - docker logs DEV - curl -sSL docker:32400/identity | tee /dev/stderr | xmlstarlet sel -t -v "/MediaContainer/@version" | grep -qw $CUR_VERSION - - docker kill DEV #Not really needed, but keeps things quick + - docker kill DEV # Not really needed, but keeps things quick publish: image: docker @@ -37,14 +38,14 @@ pipeline: environment: - DOCKER_HOST=tcp://docker:2375 commands: - #Grab just the version, not the hash. Used for tagging + # Grab just the version, not the hash. Used for tagging - export CUR_VERSION=$(cat .plex_version | cut -d \- -f1 ) - echo $DOCKER_USER - docker tag devbuild adamant/plexmediaserver:latest - docker tag devbuild adamant/plexmediaserver:$CUR_VERSION - docker login -u $DOCKER_USER -p $DOCKER_PASS - docker push adamant/plexmediaserver - - echo "CONGRATS! SUCCESSFULLY BUILT PLEX VERSION "$CUR_VERSION + - echo "CONGRATS! SUCCESSFULLY BUILT PLEX VERSION $CUR_VERSION" downstream: image: plugins/downstream From 80906b4d201222728602b50254bd3dce53ade7fc Mon Sep 17 00:00:00 2001 From: Joe Groocock Date: Sun, 27 Aug 2017 16:46:44 +0100 Subject: [PATCH 5/5] Fix Plex logging by cheating with 'tail -f' --- start_pms | 2 ++ 1 file changed, 2 insertions(+) diff --git a/start_pms b/start_pms index 51d3b7f..e278eb6 100644 --- a/start_pms +++ b/start_pms @@ -42,4 +42,6 @@ if [ -f "$PIDFILE" ]; then rm -f "$PIDFILE" fi +tail -F "$PLEX_MEDIA_SERVER_CONFIG_DIR/Logs/Plex Media Server.log" >/proc/1/fd/1 2>/dev/null & + exec su-exec $UID:$GID "$PLEX_MEDIA_SERVER_HOME/Plex Media Server"