version: '3.7'

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

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

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