version: '2'

services:
  mysql:
    container_name: mysql.${DOMAIN}
    network_mode: test
    image: mysql
    expose:
      - 3306
    volumes:
      - ./docker/mysql:/docker-entrypoint-initdb.d
    environment:
      - MYSQL_ROOT_PASSWORD=root
      - MYSQL_DATABASE=docker
  redis:
    container_name: redis.${DOMAIN}
    network_mode: test
    image: redis
    expose:
      - 6379
  web:
    container_name: ${DOMAIN}
    network_mode: test
    image: isotop/php:5.6-apache
    expose:
    - 80
    volumes:
      - ${HOME}/.ssh:/root/.ssh
      - .:/var/www/html
    environment:
      - BEFORE_APACHE_FILE=/var/www/html/docker/scripts/before-apache.sh
      - SITEPATH=/var/www/html/web
      - VIRTUAL_HOST=${DOMAIN}
      - VIRTUAL_PORT=80
    depends_on:
      - mysql
      - redis

version: '2'

services:
  mysql:
    container_name: mysql.${DOMAIN}
    network_mode: test
    image: mysql
    expose:
      - 3306
    volumes:
      - ./docker/mysql:/docker-entrypoint-initdb.d
    environment:
      - MYSQL_ROOT_PASSWORD=root
      - MYSQL_DATABASE=docker
  redis:
    container_name: redis.${DOMAIN}
    network_mode: test
    image: redis
    expose:
      - 6379
  web:
    container_name: ${DOMAIN}
    network_mode: test
    image: isotop/php:5.6-apache
    expose:
    - 80
    volumes:
      - ${HOME}/.ssh:/root/.ssh
      - .:/var/www/html
    environment:
      - BEFORE_APACHE_FILE=/var/www/html/docker/scripts/before-apache.sh
      - SITEPATH=/var/www/html/web
      - VIRTUAL_HOST=${DOMAIN}
      - VIRTUAL_PORT=80
      - WP_ENV=docker
    depends_on:
      - mysql
      - redis

Add WP_ENV to docker compose
Add WP_ENV to docker compose
