Can you tell me why this says "PMA has no container to start"

I’m creating a template yml file that to create wordpress sites on my QNAP NAS server. I have both Adminer and PHPMyAdmin in it and would usually remove one or the other. However, I ran it with both in there and got the error above and when I remove PMA it then gives the same error for WP-CLI just before it.

I’m new to Docker, but managed to get 9 sites up and running but realised I needed to add other tools to manage these sites, like PMA or Adminer.

Many thanks
Pete

#Site-wide
#
#Site name = -$sitename = xxx

#Database variables
#image type = -$database mariadb
#image version = -$dbversion latest
#MYSQL_ROOT_PASSWORD = -$dbrootpassword = xxx
#MYSQL_DATABASE = -$dbname $$sitename
#MYSQL_USER =  -$dbuser xxx
#MYSQL_PASSWORD = -$dbpassword  xxx

#Wordpress Variables
#
#Port = -$wpport 821
#Version = -$wpversion latest

#-------------------------------------------------------------------

version: "3.8"
services:
  db:
    image: $$database:$$dbversion
    # If you really want to use MySQL, uncomment the following line
    #image: mysql:8.0.27
    restart: unless-stopped
    command:
      [
        "--default_authentication_plugin=mysql_native_password",
        "--character-set-server=utf8mb4",
        "--collation-server=utf8mb4_unicode_ci",
      ]
    volumes:
      #- ./wp-data:/docker-entrypoint-initdb.d
      - .db_data:/var/lib/mysql

    environment:
      MYSQL_ROOT_PASSWORD: $$dbrootpassword
      MYSQL_DATABASE: $$dbname_db
      MYSQL_USER: $$dbuser
      MYSQL_PASSWORD: $$dbpassword

    container_name: $$sitename_db
    ports:
      - $$wpport6:3306

  adminer:
    image: adminer:latest
    container_name: $$sitename_adminer
    restart: always
    depends_on:
      - db
    links:
      - db
    ports:
      - $$wpport5:8080

  wordpress:
    container_name: $$sitename_wordpress
    image: wordpress:$$wpversion
    restart: always
    depends_on:
      - db
    ports:
      - $$wpport0:80
    environment:
      WORDPRESS_DB_HOST: db
      WORDPRESS_DB_USER: $$dbuser
      WORDPRESS_DB_NAME: $$dbname_db
      WORDPRESS_DB_PASSWORD: $$dbpassword
    volumes:
      # our persistent local data re routing
      - .:/var/www/html/wp-content/themes/testing:delegated
      - ./plugins:/var/www/html/wp-content/plugins
      - ./uploads:/var/www/html/wp-content/uploads
      - ./uploads.ini:/usr/local/etc/php/conf.d/uploads.ini
      - ./php.ini:/usr/local/etc/php/conf.d/conf.ini
      - ./config/php.conf.ini:/usr/local/etc/php/conf.d/conf.ini
      - ./theme-name/trunk/:/var/www/html/wp-content/themes/theme-name # Theme development
  wpcli:
    image: wordpress:cli
    container_name: wpcli_app
    volumes:
      - ./config/php.conf.ini:/usr/local/etc/php/conf.d/conf.ini
      - ./wp-app:/var/www/html
    environment:
      WORDPRESS_DB_HOST: db
      WORDPRESS_DB_NAME: $$dbname
      WORDPRESS_DB_USER: $$dbuser
      WORDPRESS_DB_PASSWORD: $$dbpassword
    depends_on:
      - db
      - wordpress

  pma:
    image: phpmyadmin:latest
    container_name: pma
    restart: unless-stopped
    environment:
      #https://docs.phpmyadmin.net/en/latest/setup.html#docker-environment-variables
      PMA_HOST: db
      PMA_PORT: $$wpport6:80
      MYSQL_ROOT_PASSWORD: $$dbrootpassword
      UPLOAD_LIMIT: 100M
      VIRTUAL_HOST: phpmyadmin.$$sitename.test
      LETSENCRYPT_HOST: phpmyadmin.$$sitename.test

    links:
      - db:db
volumes:
  db:
  wordpress:

I’m not familiar with the error message, but those double dollars don’t seem valid. Double dolars in a compose file will be replaced with a single dollar. so you get a string not the value of a variable. Did you just use it as a place holder to hide the original values from on the forum?

Sorry, they are just markers for me to do a number of find/replace and are not part of the final yaml.

Regards
Pete

Just to be clear, this is a template with $$variablenames that I run a series of find/replace against as I dont have access to a .env environmental variables on my QNAP nas server

Thank you for the explanation. Unfortunately I still can’t help as I don’t think I ever saw an error message like this and I couldn’t find it on Google, although I only tried one search for “has no container to start” and checked the first page. Maybe if you could share some commands and the exact outputs or at least what is around “PMA has no container to start”, that could help. If this is the exact error message, it doesn’t make sense to me. Especially since PMA is uppercase and I don’t see anything uppercase in your compose file.