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 (Official) How to Add Custom Containers to PG

azerial_andric

Blitz 3rd Class
I am on v.8.3.13 and I have the same trouble. I have another custom container defined in mycontainers that was deployed on version 7 and it re-deploys and works great. However, my new container (pihole.yml) does not appear in PG Box (any option) and when you type pihole (value of pgrole in the ansible file) it is not found.
@samspade21 Heres the bug that is related to this issue: Can't create custom containers

@Sn0wed I personally find the portainer UI to create containers to be clunky and prefer using the ansible pg template. That being said, a bug is a bug.
 
Last edited:

azerial_andric

Blitz 3rd Class
All this completed in 8.1.14 update
@Admin9705

Fix Fail
This is on the original bug, but here also for reference. Let me know if you want a new bug.

plexguide Version: 8.3.15

Impact: Custom containers cannot be deployed

Repro:
1. Create a custom container using the following command `cp /opt/mycontainers/_template.yml /opt/mycontainers/containerTest.yml `
2. Modify the yaml file using nano (or just leave it the same, this is just a test).
3. Verify the yaml file is valid using nano (or less)
4. Run plexguide `sudo plexguide`
5. Select the options `4, 2, 1` ( PG Box : Apps ~ Core, Community & Removal>PG Box: Community>Utilize Community Box - PlexGuide's)
6. Type in the name of your custom container, in this instance `containerTest` and press enter
7. Observe containerTest is listed as Apps queued for Installation
8. Type `deploy` and hit enter
9. Observe the container cannot be deployed with the error `ERROR -- No APP Queued for Install!`

Additional Info:
Console Output:

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
? PGBox ~ Multi-App Installer ? Reference: pgbox.plexguide.com
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

? Potential Apps to Install

airsonic alltube bazarr beets bitwarden booksonic bookstack
cadvisor cloudcmd containerTest ddclient deezloaderremix delugevpn deluge
duplicati embystats filebot gazee handbrake2 handbrake headphones
heimdall home-assistant htpcmanager jdownloader2 kitana logarr makemkv
mariadb mcmyadmin medusa mellow mkvtoolnix monitorr muximux
mylar nextcloud nowshowing organizr pyload radarr4k radarrhdr
resilio sharesite sonarr4k sonarrhdr speedtest synclounge syncthing
thelounge ubooquity xteve

? Apps Queued for Installation

containerTest

? Quitting? TYPE > exit | ? Ready to install? TYPE > deploy
? Type APP for QUEUE | Press [ENTER]: deploy
ERROR -- No APP Queued for Install!
 
Last edited:

Cyb3rGh05t

Blitz Sergeant
Hey team,

i get an
Code:
ERROR! playbooks must be a list of plays
error whil deploying a custom container.

What can i do to fix it? i am trying to install a second instance of jdownloader2.

Thanks

this is my custom container i added in mycontainers. i can see it in the list of apps but after deploying i get that error...


Code:
#!/bin/bash
#
# Title:      PlexGuide (Reference Title File)
# Author(s):  Admin9705
# URL:        https://plexguide.com - http://github.plexguide.com
# GNU:        General Public License v3.0
################################################################################
---
- hosts: localhost
  gather_facts: false
  tasks:
    # FACTS #######################################################################

    - name: 'Set Known Facts'
      set_fact:
        pgrole: 'jdownloader_movies'
        intport: '5852'
        extport: '5850'
        intport2: '5901'
        extport2: '5901'
        intport3: '3130'
        extport3: '3130'
        image: 'jlesage/jdownloader-2'

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

    # MIGRATIONS (REMOVE SECTION ON MARCH 1st) #############################################################
#    - name: 'Check for old volumes'
#      stat:
#        path: '{{path.stdout}}/{{pgrole}}'
#      register: oldcheck
#
    # MIGRATIONS (REMOVE SECTION ON MARCH 1st) #############################################################
    - name: 'Check for old volumes'
      stat:
        path: '{{path.stdout}}/{{pgrole}}'
      register: oldcheck

    - name: 'Migrations'
      block:
        - name: 'Creating new downloads location'
          command: 'mkdir -p {{path.stdout}}/downloads/jdownloader2/movies'

    - name: 'Chown download folder'
      shell: 'chown -R 1000:1000 {{path.stdout}}/downloads/jdownloader2/movies/'

    - name: 'Chmod download folder'
      shell: 'chmod -R 775 {{path.stdout}}/downloads/jdownloader2/movies/'

    - name: 'Ini Check'
      stat:
        path: /opt/appdata/{{pgrole}}/core.conf
      register: inicheck

    # LABELS ######################################################################


    - name: 'Adding Traefik'
      set_fact:
        pg_labels:
          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'
          - '{{path.stdout}}/downloads/jdownloader2/movies/:/output:rw'
          - '/etc/localtime:/etc/localtime:ro'

    - name: 'Setting PG ENV'
      set_fact:
        pg_env:
          UID: 1000
          GID: 1000

    # MAIN DEPLOYMENT #############################################################
    - name: 'Create scripts directory for {{pgrole}}'
      file:
        path: /opt/appdata/{{pgrole}}/scripts
        state: directory
        owner: 1000
        group: 1000
        mode: 0755

#    - name: 'Create plugins directory for {{pgrole}}'
#      file:
#        path: /opt/appdata/{{pgrole}}/plugins
#        state: directory
#        owner: 1000
#        group: 1000
#        mode: 0755

    - 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}}'

    - name: 'Wait 6 Seconds'
      wait_for:
        timeout: 6

    - name: Stop Container
      docker_container:
        name: '{{pgrole}}'
        state: stopped

    # ENDING FOR JDOWNLOADER2 ###########################################################

#    - name: 'Waiting for {{pgrole}} to initialize'
#      wait_for:
#        path: '/opt/appdata/{{pgrole}}/core.conf'
#        state: present

    - name: 'Configuring {{pgrole}} for first time use'
      block:
        - name: 'Stopping {{pgrole}}'
          docker_container:
            name: '{{pgrole}}'
            state: stopped

#       - name: Setting plugins directory
#          lineinfile:
#            path: '/opt/appdata/{{pgrole}}/core.conf'
#            regexp: '"plugins_location"'
#            line: '"plugins_location": "/config/plugins",'
#            state: present

        - name: Restart Container
          docker_container:
            name: '{{pgrole}}'
            state: started

      when: not inicheck.stat.exists
 
Last edited:

eclipseserena

Blitz 3rd Class
So I've been looking at the .yml of some community apps and I'm dumbfounded
Where in the .yml does it actually pull the docker image or w/e to install the actual app
 

Derfla76

Blitz 2nd Class
guess on my part, but:

Code:
tasks:
    # FACTS #######################################################################
    - name: 'Set Known Facts'
      set_fact:
        pgrole: 'calibre-web'
        intport: '8083'
        extport: '8083'
        image: 'technosoft2000/calibre-web' <-- this would be my guess!!!!! -->
The image line ^^^^

But I could be wrong and will let others comment to verify.
 

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

 

Members online

Trending

Top