version : '2'

services:
  web:
    build:
      context: .
      dockerfile: php.dockerfile
    volumes:
      - ./log/apache2/:/var/log/apache2/
    ports:
      - '8000:80'
    depends_on:
      - db
    #use links keywoard to use db as a known host "db" to connect to database
    links:
      - db

  db: 
    build: ./docker/mysql
    ports:
      - '13306:3306'