version: '3.1'

services:
  wordpress:
    depends_on:
      - mysql
    image: hardeepasrani/pirate-brewery
    ports:
      - 999:80
    volumes:
      - ./tests/sample_products/sample_plugin:/var/www/html/wp-content/plugins/sample_plugin
      - ./:/var/www/html/wp-content/plugins/sample_plugin/vendor
    restart: always
    environment:
      WORDPRESS_DB_NAME: wordpress
      WORDPRESS_DB_USER: wordpress
      WORDPRESS_DB_PASSWORD: wordpress
      WORDPRESS_DB_ROOT_PASSWORD: wordpress
  mysql:
    image: mysql:5.7
    volumes:
      - ~/db_data:/var/lib/mysql
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: wordpress
      MYSQL_DATABASE: wordpress
      MYSQL_USER: wordpress
      MYSQL_PASSWORD: wordpress
