Skip to content

phpMyAdmin

phpMyAdmin-logo

phpMyAdmin is a web-based administration tool for MySQL databases. It allows you to manage databases, run queries, create and modify tables, manage user accounts and permissions — all from a browser GUI.

I run three separate instances of phpMyAdmin, one on each host that has a MySQL database:

docker-compose

networks:
  proxy:
    external: "true"

services:
  phpmyadmin-titan:
    image: phpmyadmin:latest
    container_name: phpmyadmin-titan
    environment:
      - PMA_HOSTS=titan-mysql-db
    restart: unless-stopped
    networks:
      proxy:
        ipv4_address: "172.19.0.105"
    ports:
      - 84:80
    volumes:
      - /ssd/docker/appdata/phpmyadmin/sessions
      - /ssd/docker/appdata/phpmyadmin/config.user.inc.php:/etc/phpmyadmin/config.user.inc.php
      - /ssd/docker/appdata/phpmyadmin/custom/phpmyadmin/theme/:/www/themes/theme/

Even though this is hosted on Titan, I have opted to use a dynamic file rather than labels.

This file is located here phpmyadmin-titan

networks:
  phobos-network:
    external: true

services:
  phpmyadmin-phobos:
    image: phpmyadmin:latest
    container_name: phpmyadmin-phobos
    environment:
      - PMA_HOSTS=phobos-mysql-db
    restart: unless-stopped
    networks:
      phobos-network:
        ipv4_address: "172.20.0.6"
    ports:
      - 84:80
    volumes:
      - /ssd/docker/appdata/phpmyadmin-phobos/sessions
      - /ssd/docker/appdata/phpmyadmin-phobos/config.user.inc.php:/etc/phpmyadmin/config.user.inc.php

As this runs on a different host to Traefik, a dynamic file is used to route it through Traefik with SSL.

This file is located here phpmyadmin-phobos

networks:
  tethys-network
    external: "true"

services:
  phpmyadmin-tethys:
    image: phpmyadmin:latest
    container_name: phpmyadmin-tethys
    environment:
      - PMA_HOSTS=tethys-mysql-db
    restart: unless-stopped
    networks:
      tethys-network:
        ipv4_address: "172.21.0.5"
    ports:
      - 81:80
    volumes:
      - /ssd/docker/appdata/phpmyadmin/sessions
      - /ssd/docker/appdata/phpmyadmin/config.user.inc.php:/etc/phpmyadmin/config.user.inc.php
      - /ssd/docker/appdata/phpmyadmin/custom/phpmyadmin/theme/:/www/themes/theme/

As this runs on a different host to Traefik, a dynamic file is used to route it through Traefik with SSL.

This file is located here phpmyadmin-tethys