From 2511dd247b78833fedf2daccd53ffe74a645304f Mon Sep 17 00:00:00 2001 From: Daniel Doubet Date: Fri, 28 Oct 2022 09:44:51 -0500 Subject: [PATCH] Add Plex Media Server test 10 --- README.md | 2 +- VERSION | 2 +- balena.yml | 2 +- docker-compose.yml | 10 +++------- plex2/Dockerfile | 9 +++++++++ plex2/mount.sh | 13 +++++++++++++ 6 files changed, 28 insertions(+), 10 deletions(-) create mode 100644 plex2/Dockerfile create mode 100644 plex2/mount.sh diff --git a/README.md b/README.md index 7cbd762..fb2ef06 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Docker compose for my Raspberry Pi 3B running balena os x64 I forgot the password to my old HA instance, so I bought a nice, new, and shiny 128GB Samsung A2 card and used [balenaEtcher](https://www.balena.io/etcher/) to write the balena os to it. I then spent two days finding the right combination to get both [balena-homeassistant](https://github.com/balenalabs-incubator/balena-homeassistant) and [balena-rpiplay](https://github.com/rahul-thakoor/balena-rpiplay) working in tandem. ## Changelog -### Version 1.4.8 +### Version 1.4.10 - 2022-10-27: Attempt to add Plex ### Version 1.3.0 - 2022-10-27: Removed RPIPlay diff --git a/VERSION b/VERSION index b2e46d1..ac9f79c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.4.8 +1.4.10 diff --git a/balena.yml b/balena.yml index e1c2ae8..1c37a77 100644 --- a/balena.yml +++ b/balena.yml @@ -28,4 +28,4 @@ data: - PLEX_CLAIM_TOKEN: "" - PLEX_ADVERTISE_IP: "" - PLEX_TZ: "America/Chicago" -version: 1.4.8 +version: 1.4.10 diff --git a/docker-compose.yml b/docker-compose.yml index 69b9c4d..25db65d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -43,7 +43,7 @@ services: - homeassistant plex: build: - context: plex + context: plex2 network_mode: host ports: - '80:32400' @@ -63,9 +63,5 @@ services: - plex:/transcode restart: always environment: - TZ: America/Chicago - ADVERTISE_IP: - PLEX_CLAIM: - - PUID=0 - - PGID=0 - - VERSION=docker \ No newline at end of file + PUID: 911 + PGID: 911 \ No newline at end of file diff --git a/plex2/Dockerfile b/plex2/Dockerfile new file mode 100644 index 0000000..2dfcd7d --- /dev/null +++ b/plex2/Dockerfile @@ -0,0 +1,9 @@ +FROM linuxserver/plex:arm64v8-latest + +COPY mount.sh / + +RUN chmod a+x /mount.sh + +ENTRYPOINT [ "/bin/sh" ] + +CMD [ "-c", "/mount.sh && /init" ] \ No newline at end of file diff --git a/plex2/mount.sh b/plex2/mount.sh new file mode 100644 index 0000000..765df90 --- /dev/null +++ b/plex2/mount.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +PUID=${PUID:-911} +PGID=${PGID:-911} + +for uuid in $(blkid -sUUID -ovalue /dev/sd??) +do + mkdir -v /media/"${uuid}" 2>/dev/null + mount -v UUID="${uuid}" /media/"${uuid}" || exit 1 + chown -v "${PUID}:${PGID}" /media/"${uuid}" +done + +exit 0 \ No newline at end of file