version: '3.7'

services:
  php:
    image: laravel_php
    container_name: laravel_php
    build:
      args:
        ENVIRONMENT: local
      context: ../
      dockerfile: deployment/docker/laravel-nginx/php/Dockerfile
    volumes:
      - ${PWD}/laravel-nginx:/web/laravel/:rw
    networks:
      - default

  nginx:
    image: laravel_nginx
    container_name: laravel_nginx
    build:
      args:
        VERSION: 1.25.2
        ENVIRONMENT: local
      context: ../
      dockerfile: deployment/docker/laravel-nginx/nginx/Dockerfile
    ports:
      - 80:80
      - 443:443
    volumes:
      - ${PWD}/laravel-nginx:/web/laravel/:rw
    depends_on:
      - php
    networks:
      - default

networks:
  default:
    name: practice-network
    external: true