What's new
PGBlitz.com

Register Now! Find useful tips, Interact /w Community Members and join the part the Best Community on the Internet!

Guides mediainfo [ community app ]

M

MrDoob

Guest
1.) cd /opt/mycontainers/

2.) nano mediainfo.yml

3.) paste the lines below

here the yml.file

Bash:
#!/bin/bash
#
# Title:      PGBlitz (jlesage/mediainfo)
# Author(s):  MrDoob
# URL:        https://pgblitz.com - http://github.pgblitz.com
# GNU:        General Public License v3.0
################################################################################
---
- hosts: localhost
  gather_facts: false
  tasks:
    # FACTS #######################################################################
    - name: 'Set Known Facts'
      set_fact:
        pgrole: 'mediainfo'
        intport: '5800'
        extport: '5806'
        intport2: '5900'
        extport2: '5907'
        image: 'jlesage/mediainfo:latest'

    # CORE (MANDATORY) ############################################################
    - name: 'Including cron job'
      include_tasks: '/opt/communityapps/apps/_core.yml'

    # LABELS ######################################################################
    - name: 'Adding Traefik'
      set_fact:
        pg_labels:
          traefik.frontend.auth.forward.address: '{{gauth}}'
          traefik.enable: 'true'
          traefik.port: '{{intport}}'
          traefik.frontend.rule: 'Host:{{pgrole}}.{{domain.stdout}},{{tldset}}'

    - name: 'Setting PG Volumes'
      set_fact:
        pg_volumes:
          - '/opt/appdata/{{pgrole}}:/config'
          - '{{path.stdout}}:{{path.stdout}}'
          - '/mnt/unionfs:/unionfs:rw'
          - '/mnt:/mnt:rw'
          - '/etc/localtime:/etc/localtime:ro'

    - name: 'Setting PG ENV'
      set_fact:
        pg_env:
          PUID: '1000'
          PGID: '1000'
          TZ: '${TZ}'
         
    # MAIN DEPLOYMENT #############################################################
    - name: 'Deploying {{pgrole}}'
      docker_container:
        name: '{{pgrole}}'
        image: '{{image}}'
        pull: yes
        published_ports:
          - '{{ports.stdout}}{{extport}}:{{intport}}'
        volumes: '{{pg_volumes}}'
        env: '{{pg_env}}'
        restart_policy: unless-stopped
        networks:
          - name: plexguide
            aliases:
              - '{{pgrole}}'
        state: started
        labels: '{{pg_labels}}'
4.) pgblitz

5.) 5 - 2 - 1 - mediainfo - deploy

6.) https://mediainfo.yourdomain.anyelse
 
Last edited by a moderator:

McKentin

Junior Member
Awesome Thanks @MrDoob, you work so fast. Please quote me some day when you also whip up the RCB addon :D . It was a good chooice to move to PGblitz completely.
 

McKentin

Junior Member
@MrDoob if returns an error.

ERROR! Syntax Error while loading YAML.
expected <block end>, but found '<scalar>'

The error appears to have been in '/opt/communityapps/apps/mediainfo.yml': line 20, column 17, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

extport2: '5907''
image: 'jlesage/mediainfo:latest'
^ here
This one looks easy to fix. It seems that there is a value started
with a quote, and the YAML parser is expecting to see the line ended
with the same kind of quote. For instance:

when: "ok" in result.stdout

Could be written as:

when: '"ok" in result.stdout'

Or equivalently:

when: "'ok' in result.stdout"
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads


Development Donations

 

Top NZB NewsGroups!

Members - Up To a 58% Discount!

Trending

Online statistics

Members online
11
Guests online
132
Total visitors
143
Top