Skip to content

Commit

Permalink
Merge pull request #234 from pabloromeo/dev
Browse files Browse the repository at this point in the history
Credits Detection Bugfix and Armhf deprecation
  • Loading branch information
pabloromeo authored Jul 6, 2023
2 parents 2c29dac + 7ef6ea5 commit 1e3d85b
Show file tree
Hide file tree
Showing 16 changed files with 1,302 additions and 1,025 deletions.
3 changes: 3 additions & 0 deletions .env-template
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
TZ="America/Argentina/Buenos_Aires"
PUID=1000
PGID=1000
50 changes: 24 additions & 26 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ name: Docker Builds
on:
workflow_dispatch:
schedule:
- cron: '0 1 * * *'
- cron: "0 1 * * *"
push:
branches:
- 'master'
- 'dev'
- 'experimental'
- "master"
- "dev"
- "experimental"
tags:
- 'v*.*.*'
- "v*.*.*"
pull_request:
branches:
- 'master'
- 'dev'
- "master"
- "dev"

permissions:
permissions:
contents: read
packages: write

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build-pms:
Expand All @@ -31,7 +31,7 @@ jobs:
# Get the repositery's code
- name: Checkout
uses: actions/checkout@v3

# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand All @@ -40,8 +40,8 @@ jobs:
id: buildx
uses: docker/setup-buildx-action@v2

# - name: Available platforms
# run: echo ${{ steps.buildx.outputs.platforms }}
# - name: Available platforms
# run: echo ${{ steps.buildx.outputs.platforms }}

- name: Login to GHCR
if: github.event_name != 'pull_request'
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
with:
context: ./pms
file: ./pms/extended-image/Dockerfile
platforms: linux/amd64,linux/arm64,linux/arm/v7
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta_pms.outputs.tags }}
labels: ${{ steps.meta_pms.outputs.labels }}
Expand All @@ -91,14 +91,14 @@ jobs:
repository: pabloromeo/clusterplex_pms
readme-filepath: ./README.md
short-description: "PMS image for ClusterPlex"

build-worker:
runs-on: ubuntu-latest
steps:
# Get the repositery's code
- name: Checkout
uses: actions/checkout@v3

# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand All @@ -107,8 +107,8 @@ jobs:
id: buildx
uses: docker/setup-buildx-action@v2

# - name: Available platforms
# run: echo ${{ steps.buildx.outputs.platforms }}
# - name: Available platforms
# run: echo ${{ steps.buildx.outputs.platforms }}

- name: Login to GHCR
if: github.event_name != 'pull_request'
Expand All @@ -124,8 +124,7 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

-
name: Docker meta for Worker
- name: Docker meta for Worker
id: meta_worker
uses: docker/metadata-action@v4
with:
Expand All @@ -147,7 +146,7 @@ jobs:
with:
context: ./worker
file: ./worker/extended-image/Dockerfile
platforms: linux/amd64,linux/arm64,linux/arm/v7
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta_worker.outputs.tags }}
labels: ${{ steps.meta_worker.outputs.labels }}
Expand All @@ -167,7 +166,7 @@ jobs:
# Get the repositery's code
- name: Checkout
uses: actions/checkout@v3

# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand All @@ -176,8 +175,8 @@ jobs:
id: buildx
uses: docker/setup-buildx-action@v2

# - name: Available platforms
# run: echo ${{ steps.buildx.outputs.platforms }}
# - name: Available platforms
# run: echo ${{ steps.buildx.outputs.platforms }}

- name: Login to GHCR
if: github.event_name != 'pull_request'
Expand All @@ -193,8 +192,7 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

-
name: Docker meta for Orchestrator
- name: Docker meta for Orchestrator
id: meta_orchestrator
uses: docker/metadata-action@v4
with:
Expand All @@ -215,7 +213,7 @@ jobs:
uses: docker/build-push-action@v4
with:
context: ./orchestrator
platforms: linux/amd64,linux/arm64,linux/arm/v7
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta_orchestrator.outputs.tags }}
labels: ${{ steps.meta_orchestrator.outputs.labels }}
Expand Down
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ typings/
# next.js build output
.next

docker-compose.yml

# macOS
**/.DS_STORE

# for local testing
sample-content/
91 changes: 91 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
version: '3.8'

services:
plex:
container_name: plex
build:
context: ./pms
dockerfile: ./extended-image/Dockerfile-development
environment:
VERSION: docker
PUID: ${PUID}
PGID: ${PGID}
TZ: ${TZ}
ORCHESTRATOR_URL: http://plex-orchestrator:3500
PMS_SERVICE: plex # This service. If you disable Local Relay then you must use PMS_IP instead
PMS_PORT: "32400"
TRANSCODE_OPERATING_MODE: both #(local|remote|both)
TRANSCODER_VERBOSE: "1" # 1=verbose, 0=silent
LOCAL_RELAY_ENABLED: "1"
LOCAL_RELAY_PORT: "32499"
healthcheck:
test: curl -fsS http://localhost:32400/identity > /dev/null || exit 1
interval: 15s
timeout: 15s
retries: 5
start_period: 30s
volumes:
- plex-config:/config
- transcode-volume:/transcode
- ./sample-content/tv:/data/tv
- ./sample-content/movies:/data/movies
ports:
- 32499:32499 # LOCAL_RELAY_PORT
- 32400:32400
- 3005:3005
- 8324:8324
- 1900:1900/udp
- 32410:32410/udp
- 32412:32412/udp
- 32413:32413/udp
- 32414:32414/udp

plex-orchestrator:
container_name: plex-orchestrator
build: ./orchestrator
healthcheck:
test: curl -fsS http://localhost:3500/health > /dev/null || exit 1
interval: 15s
timeout: 15s
retries: 5
start_period: 30s
environment:
TZ: ${TZ}
LISTENING_PORT: 3500
WORKER_SELECTION_STRATEGY: "LOAD_RANK" # RR | LOAD_CPU | LOAD_TASKS | LOAD_RANK (default)
volumes:
- /etc/localtime:/etc/localtime:ro
ports:
- 3500:3500

plex-worker:
build:
context: ./worker
dockerfile: ./extended-image/Dockerfile-development
deploy:
mode: replicated
replicas: 1
environment:
VERSION: docker
PUID: 1000
PGID: 1000
TZ: ${TZ}
LISTENING_PORT: 3501 # used by the healthcheck
STAT_CPU_INTERVAL: 2000 # interval for reporting worker load metrics
ORCHESTRATOR_URL: http://plex-orchestrator:3500
EAE_SUPPORT: "1"
healthcheck:
test: curl -fsS http://localhost:3501/health > /dev/null || exit 1
interval: 15s
timeout: 15s
retries: 5
start_period: 240s
volumes:
- codecs:/codecs
- ./sample-content/tv:/data/tv
- ./sample-content/movies:/data/movies
- transcode-volume:/transcode
volumes:
plex-config:
transcode-volume:
codecs:
Loading

0 comments on commit 1e3d85b

Please sign in to comment.