version: '2' services: web: image: nginx:alpine ports: - "80:80" volumes: - ./:/var/www - ./html:/var/www/html - ./conf.d:/etc/nginx/conf.d links: - php - mysql - redis restart: always environment: - "APP_ENV=development" php: build: ./docker/php volumes: - ./:/var/www - ./web:/var/www/html links: - redis restart: always environment: - "APP_ENV=development" mysql: image: mysql:5.7 environment: - "MYSQL_ROOT_PASSWORD=root" - "MYSQL_DATABASE=doughnut" - "MYSQL_USER=doughnut" - "MYSQL_PASSWORD=doughnut" ports: - "3306:3306" volumes: - ./lib/mysql:/var/lib/mysql redis: build: ./docker/redis ports: - "6379:6379"