version: "3.9"

services:
  super_ltm:
    container_name: super_ltm
    image: seiod/super-ltm-php:latest
    ports:
      - "127.0.0.28:5555:80"
    networks:
      - isolated_nw
    user: www-data
    volumes:
      - ./../:/var/www/html/:rw
      - /etc/hosts:/etc/hosts
    command: ["sh", "-c", "/var/www/html/docker/apache/init.sh"]

  super_ltm_mysql:
    container_name: super_ltm_mysql
    image: mariadb:10.6
    ports:
      - "127.0.0.29:3306:3306"
    networks:
      - isolated_nw
    restart: unless-stopped
    environment:
      MYSQL_ROOT_PASSWORD: 1111
      MYSQL_DATABASE: cdb
      MYSQL_USER: cdb_root
      MYSQL_PASSWORD: 1111
    volumes:
      - mariadb_data:/var/lib/mysql
      - ./../docker/mysql/00-super-ltm.cnf:/etc/mysql/mariadb.conf.d/00-super-ltm.cnf

  super_ltm_phpmyadmin:
    container_name: super_ltm_phpmyadmin
    image: phpmyadmin/phpmyadmin
    ports:
      - "127.0.0.30:8080:80"
    networks:
      - isolated_nw
    restart: unless-stopped
    environment:
      PMA_HOST: super_ltm_mysql
      PMA_USER: root
      PMA_PASSWORD: 1111
      PMA_ARBITRARY: 1

  super_support_mock_agent:
    container_name: super_support_mock_agent
    image: python:3.11-slim
    ports:
      - "5310:5310"
    networks:
      - isolated_nw
    user: root
    volumes:
      - ./python/mock-agent/:/var/www/python/:rw
      - /etc/hosts:/etc/hosts
    command: ["sh", "-c", "/var/www/python/init.sh"]

volumes:
  mariadb_data: {}

networks:
  isolated_nw: