version: '3'

services:
  layerfarm_php:
    build:
      context: .
      dockerfile: Dockerfile
    image: layerfarm-app
    container_name: layerfarm-php-container
    restart: unless-stopped
    working_dir: /var/www
    volumes:
      - .:/var/www
    networks:
      - layerfarm-network
      - laravel-network

  layerfarm_nginx:
    image: nginx:alpine
    container_name: layerfarm-nginx-container
    restart: unless-stopped
    ports:
      - "8090:80"
    volumes:
      - .:/var/www
      - ./nginx/conf.d:/etc/nginx/conf.d
    networks:
      - layerfarm-network
    depends_on:
      - layerfarm_php

networks:
  layerfarm-network:
    driver: bridge

  laravel-network:
    external: true
    name: bpbd_laravel-network
