captainVersion: 4
services:
    $$cap_appname:
        image: dpage/pgadmin4:$$cap_pgadmin4_version
        restart: always
        environment:
            PGADMIN_DEFAULT_EMAIL: $$cap_email
            PGADMIN_DEFAULT_PASSWORD: $$cap_password
        volumes:
            - $$cap_appname-data:/var/lib/pgadmin
caproverOneClickApp:
    variables:
        - id: $$cap_pgadmin4_version
          label: Version Tag
          description: Check out their Docker page for the valid tags https://hub.docker.com/r/dpage/pgadmin4/tags/
          defaultValue: '4.27'
          validRegex: /^([^\s^\/])+$/
        - id: $$cap_email
          label: Email
          description: Email address used when setting up the initial administrator account to login to pgAdmin
          defaultValue: ''
          validRegex: /^([^\s^\/])+$/
        - id: $$cap_password
          label: Password
          description: Password used when setting up the initial administrator account to login to pgAdmin
          defaultValue: $$cap_gen_random_hex(10)
          validRegex: /^([^\s^\/])+$/
    instructions:
        start: >-
            pgAdmin is the most popular and feature rich Open Source administration and development platform for PostgreSQL, the most advanced Open Source database in the world.

            Enter your Configuration parameters and click on next. It will take about a minute for the process to finish.
        end: Your pgAdmin is deployed and being started. Please wait one minute before accessing your pgAdmin!
    displayName: ''
    isOfficial: true
    description: pgAdmin 4 is a complete rewrite of pgAdmin, built using Python and Javascript/jQuery
    documentation: 'Taken from https://www.pgadmin.org/docs/pgadmin4/latest/container_deployment.html '
