version: '4.44.2'
services:
  mysql:
    image: mysql:latest
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: wordpress
      MYSQL_DATABASE: taoly
      MYSQL_USER: wordpress
      MYSQL_PASSWORD: wordpress
    ports:
      - "3306:3306"
    volumes:
      - ./.srv/database:/var/lib/mysql

  wordpress:
    image: wordpress:latest
    restart: always
    environment:
      WORDPRESS_DB_HOST: mysql
      WORDPRESS_DB_USER: wordpress
      WORDPRESS_DB_PASSWORD: wordpress
      WORDPRESS_DB_NAME: taoly
    ports:
      - "8000:80"
    volumes:
      - ./.srv/wordpress:/var/www/html
      - ./themes/:/var/www/html/wp-content/themes/
      - ./plugins/:/var/www/html/wp-content/plugins/
      - ./mu-plugins/:/var/www/html/wp-content/mu-plugins/
      - ./.srv/custom.ini:/usr/local/etc/php/conf.d/custom.ini

    depends_on:
      - mysql
    links:
      - mysql

  phpmyadmin:
    image: phpmyadmin/phpmyadmin
    restart: always
    environment:
      MYSQL_USERNAME: wordpress
      MYSQL_ROOT_PASSWORD: wordpress
      PMA_HOST: mysql
    ports:
      - "8181:80"
    depends_on:
      - mysql
    links:
      - mysql
