From e1aefa25276bf21296e216e931e96d6e16ab12c0 Mon Sep 17 00:00:00 2001 From: Ethan Paul <24588726+enpaul@users.noreply.github.com> Date: Tue, 8 Dec 2020 23:07:25 -0500 Subject: [PATCH] Add plex compose application config --- resources/docker-compose/plex.yaml.j2 | 83 +++++++++++++++++++++++++++ vars/applications.yml | 20 +++++++ 2 files changed, 103 insertions(+) create mode 100644 resources/docker-compose/plex.yaml.j2 diff --git a/resources/docker-compose/plex.yaml.j2 b/resources/docker-compose/plex.yaml.j2 new file mode 100644 index 0000000..201c896 --- /dev/null +++ b/resources/docker-compose/plex.yaml.j2 @@ -0,0 +1,83 @@ +--- +version: "{{ omni_compose_version | string }}" + + +networks: + plex: + name: plex + driver: overlay + ipam: + driver: default + config: + - subnet: {{ omni_compose_apps.plex.networks.main }} + + +volumes: + plex-config: + name: datastore{{ omni_compose_apps.plex.datastore }} + driver: glusterfs + plex-data: + name: plex-data + driver: local + driver_opts: + type: nfs + o: "addr=plexistore.tre2.local,ro" + device: ":/nfs/plex" + + +services: + server: + image: plexinc/pms-docker:{{ omni_compose_apps.plex.versions.default }} + hostname: plex-media-server + networks: + - plex + ports: + - published: {{ omni_compose_apps.plex.published.ports.32400 }} + target: 32400 + protocol: tcp + mode: ingress + - published: {{ omni_compose_apps.plex.published.ports.3005 }} + target: 3005 + protocol: tcp + mode: ingress + - published: {{ omni_compose_apps.plex.published.ports.8324 }} + target: 8324 + protocol: tcp + mode: ingress + - published: {{ omni_compose_apps.plex.published.ports.32469 }} + target: 32469 + protocol: tcp + mode: ingress + - published: {{ omni_compose_apps.plex.published.ports.1900 }} + target: 1900 + protocol: udp + mode: ingress + - published: {{ omni_compose_apps.plex.published.ports.32410 }} + target: 32410 + protocol: udp + mode: ingress + - published: {{ omni_compose_apps.plex.published.ports.32413 }} + target: 32413 + protocol: udp + mode: ingress + - published: {{ omni_compose_apps.plex.published.ports.32414 }} + target: 32414 + protocol: udp + mode: ingress + volumes: + - type: volume + source: plex-config + target: /config + read_only: false + - type: volume + source: plex-data + target: /data + read_only: true + environment: + TZ: "Americas/New_York" + ALLOWED_NETWORKS: 10.42.100.0/24,10.42.101.0/24 + PLEX_UID: "{{ omni_compose_apps.plex.account.uid }}" + PLEX_GID: "{{ omni_compose_apps.plex.account.uid }}" + ADVERTISE_IP: "http://10.42.101.10:32400/" + deploy: + replicas: 1 diff --git a/vars/applications.yml b/vars/applications.yml index b88e8d8..2f15562 100644 --- a/vars/applications.yml +++ b/vars/applications.yml @@ -46,3 +46,23 @@ omni_compose_apps: versions: main: latest server: 1.15.2 + plex: + datastore: /appdata/plex + account: + name: mech_plex + uid: 1298 + published: + host: pms.enp.one + ports: + 32400: 32400 + 3005: 3005 + 8324: 8324 + 32469: 32469 + 1900: 1900 + 32410: 32410 + 32413: 32413 + 32414: 32414 + networks: + main: 192.168.101.0/24 + versions: + default: latest