services:
  app2:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: laravel_app2
    restart: unless-stopped
    working_dir: /var/www
    volumes:
      - .:/var/www
    networks:
      - laravel2

  web2:
    image: nginx:stable-alpine
    container_name: laravel_web2
    ports:
      - "32100:80"
    volumes:
      - .:/var/www
      - ./nginx.conf:/etc/nginx/conf.d/default.conf
    depends_on:
      - app2
    networks:
      - laravel2

  db2:
    image: mysql:5.7
    container_name: laravel_db2
    restart: unless-stopped
    environment:
      MYSQL_DATABASE: dicscovery
      MYSQL_ROOT_PASSWORD: dicscovery
      MYSQL_USER: dicscovery
      MYSQL_PASSWORD: dicscovery
    ports:
      - "3307:3306" 
    volumes:
      - db_data2:/var/lib/mysql
    networks:
      - laravel2

volumes:
  db_data2:

networks:
  laravel2:
    driver: bridge
