version: '3'

services:
  blog-server:
    build: ./provisioning
    image: laravel-blog
    depends_on:
      - mysql
      - mysql-test
      - redis
    volumes:
      - ./:/application:cached

  horizon:
    build: ./provisioning
    image: laravel-blog
    command: php artisan horizon
    depends_on:
      - mysql
    volumes:
      - ./:/application:cached

  mysql:
    image: mysql
    ports:
      - "3306:3306"
    environment:
      - MYSQL_ROOT_PASSWORD=secret
      - MYSQL_DATABASE=laravel-blog
    volumes:
      - ./storage/tmp/db:/var/lib/mysql:cached

  mysql-test:
    image: mysql
    ports:
      - "3307:3306"
    environment:
      - MYSQL_ROOT_PASSWORD=secret
      - MYSQL_DATABASE=testing

  nginx:
    image: nginx
    ports:
      - "8000:8000"
    volumes:
      - ./provisioning/nginx.conf:/etc/nginx/conf.d/default.conf:cached
      - ./:/application:cached
    depends_on:
      - blog-server

  redis:
    image: redis
    ports:
      - "6379:6379"

version: '3'

services:
  blog-server:
    build: ./provisioning
    image: laravel-blog
    depends_on:
      - mysql
      - mysql-test
      - redis
    volumes:
      - ./:/application:cached

  horizon:
    build: ./provisioning
    image: laravel-blog
    command: php artisan horizon
    depends_on:
      - mysql
    volumes:
      - ./:/application:cached

  mysql:
    image: mysql:5.7
    ports:
      - "3306:3306"
    environment:
      - MYSQL_ROOT_PASSWORD=secret
      - MYSQL_DATABASE=laravel-blog
    volumes:
      - ./storage/tmp/db:/var/lib/mysql:cached

  mysql-test:
    image: mysql:5.7
    ports:
      - "3307:3306"
    environment:
      - MYSQL_ROOT_PASSWORD=secret
      - MYSQL_DATABASE=testing

  nginx:
    image: nginx
    ports:
      - "8000:8000"
    volumes:
      - ./provisioning/nginx.conf:/etc/nginx/conf.d/default.conf:cached
      - ./:/application:cached
    depends_on:
      - blog-server

  redis:
    image: redis
    ports:
      - "6379:6379"

Revert "Upgrading to Mysql 8"
Revert "Upgrading to Mysql 8"

This reverts commit 5a4fe9ccc5e7354caf1ba474eeb06ef9fbae0536.
