services:
  web:
    build:
      context: .
      dockerfile: Dockerfile
    image: php:5.6-apache
    container_name: php56-web
    ports:
      - "8085:80"
    volumes:
      - /home/innomisedocker/public_html/project:/var/www/html
      - /home/innomisedocker/public_html/yii:/var/www/yii

    networks:
      - app-network
    depends_on:
      - mysql
    restart: always

  mysql:
    image: mysql:5.7
    container_name: mysql-db
    ports:
      - "3307:3306"
    environment:
      MYSQL_ROOT_PASSWORD: root
      MYSQL_DATABASE: innomise
    volumes:
      - mysql_data:/var/lib/mysql
    networks:
      - app-network
    restart: always

  phpmyadmin:
    image: phpmyadmin/phpmyadmin:4.8.5
    container_name: phpmyadmin
    depends_on:
      - mysql
    ports:
      - "8080:80"
    environment:
      PMA_HOST: mysql
      PMA_PORT: 3306
    networks:
      - app-network
    restart: always

volumes:
  mysql_data:

networks:
  app-network:
    driver: bridge
