version: '3.8'

services:
  wordpress:
    image: wordpress:latest
    container_name: wordpress
    environment:
      WORDPRESS_DB_HOST: '${DB_HOST}'
      WORDPRESS_DB_NAME: '${DB_NAME}'
      WORDPRESS_DB_USER: '${DB_USERNAME}'
      WORDPRESS_DB_PASSWORD: '${DB_PASSWORD}'
    ports:
      - 8081:80
    volumes:
      - ./themes:/var/www/html/wp-content/themes
      - ./plugins:/var/www/html/wp-content/plugins
      - ./uploads:/var/www/html/wp-content/uploads

  mariadb:
    image: mariadb:latest
    container_name: mariadb
    environment:
      MYSQL_DATABASE: '${DB_NAME}'
      MYSQL_USER: '${DB_USERNAME}'
      MYSQL_PASSWORD: '${DB_PASSWORD}'
      MYSQL_ROOT_PASSWORD: '${DB_ROOT_PASSWORD}'
    ports:
      - 3310:3306

  phpmyadmin:
    image: phpmyadmin:latest
    container_name: phpmyadmin
    environment:
      PMA_HOST: '${DB_HOST}'
      PMA_USER: '${DB_USERNAME}'
      PMA_PASSWORD: '${DB_PASSWORD}'
    ports:
      - 8888:80
