version: '3.8'
services:
  nginx:
    image: nginx:stable-alpine
    container_name: nginx
    ports:
      - 8888:80
    volumes:
      - .:/var/www/html
      - ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
    depends_on:
      - php
      - mariadb
    networks:
      - laravel
  mariadb:
    image: mariadb:10.4.25
    container_name: mariadb
    environment:
      MYSQL_DATABASE: homestead
      MYSQL_USER: omayra
      MYSQL_PASSWORD: omarya
      MYSQL_ROOT_PASSWORD: omarya.roo
    ports:
      - 33069:3306
    volumes:
      - db_data:/var/lib/mysql
    networks:
      - laravel
  php:
    build:
      context: .
      dockerfile: docker/php/Dockerfile
    ports:
      - 9000:80
    volumes:
      - .:/var/www/html
    networks:
      - laravel
volumes:
  db_data:
networks:
  laravel:
