version: '3.1'

services:
  wordpress:
    image: wordpress:5.6-php7.4
    restart: always
    ports:
      - 9002:80
    environment:
      WORDPRESS_DB_HOST: mysql
      WORDPRESS_DB_PASSWORD: example
      ABSPATH: /usr/src/wordpress/
      WORDPRESS_DEBUG: 1
      WORDPRESS_CONFIG_EXTRA: |
        define( 'SCRIPT_DEBUG', true );
    volumes:
      - wordpress_data:/var/www/html
      - ../../:/var/www/html/wp-content/plugins/google-site-kit
      - ../../tests/e2e/plugins:/var/www/html/wp-content/plugins/google-site-kit-test-plugins
      - ../../tests/e2e/mu-plugins:/var/www/html/wp-content/mu-plugins
    depends_on:
      - mysql

  cli:
    image: wordpress:cli
    restart: always
    user: xfs
    volumes:
      - wordpress_data:/var/www/html
      - ../../:/var/www/html/wp-content/plugins/google-site-kit
      - ../../tests/e2e/mu-plugins:/var/www/html/wp-content/mu-plugins
    depends_on:
      - mysql
      - wordpress
    command: tail -f /dev/null

  mysql:
    image: mysql:5.7
    restart: always
    ports:
      - 9306:3306
    environment:
      MYSQL_ROOT_PASSWORD: example
      MYSQL_DATABASE: wordpress_test

volumes:
  wordpress_data:

version: '3.1'

services:
  wordpress:
    image: wordpress:5.6-php7.4
    restart: always
    ports:
      - 9002:80
    environment:
      WORDPRESS_DB_HOST: mysql
      WORDPRESS_DB_PASSWORD: example
      ABSPATH: /usr/src/wordpress/
      WORDPRESS_DEBUG: 1
      WORDPRESS_CONFIG_EXTRA: |
        define( 'SCRIPT_DEBUG', true );
        define( 'WP_DEBUG_LOG', true );
        define( 'WP_DEBUG_DISPLAY', false );
    volumes:
      - wordpress_data:/var/www/html
      - ../../:/var/www/html/wp-content/plugins/google-site-kit
      - ../../tests/e2e/plugins:/var/www/html/wp-content/plugins/google-site-kit-test-plugins
      - ../../tests/e2e/mu-plugins:/var/www/html/wp-content/mu-plugins
    depends_on:
      - mysql

  cli:
    image: wordpress:cli
    restart: always
    user: xfs
    volumes:
      - wordpress_data:/var/www/html
      - ../../:/var/www/html/wp-content/plugins/google-site-kit
      - ../../tests/e2e/mu-plugins:/var/www/html/wp-content/mu-plugins
    depends_on:
      - mysql
      - wordpress
    command: tail -f /dev/null

  mysql:
    image: mysql:5.7
    restart: always
    ports:
      - 9306:3306
    environment:
      MYSQL_ROOT_PASSWORD: example
      MYSQL_DATABASE: wordpress_test

volumes:
  wordpress_data:

Configure WP debug logging in WP service.
Configure WP debug logging in WP service.
