version: '3.1'
services:
  #PHP Service
  nginx:
    image: nginx:latest
    ports:
    - "80:80"
    - "443:443"
    volumes:
    - ./nginx/hosts:/etc/nginx/conf.d
    - ./nginx/ssl:/etc/ssl
    - /etc/letsencrypt:/etc/letsencrypt
    - ./nginx/logs:/var/log/nginx
    - ./../public:/var/www/html/public:ro,cached
    - ./../storage/app:/var/www/html/storage/app:ro
    links:
      - php
    expose:
      - "80"
  php:
    build: ./php
    volumes:
      - ./../:/var/www/html
      - ./php-ini:/usr/local/etc/php/custom.d
    environment:
      PHP_INI_SCAN_DIR: "/usr/local/etc/php/conf.d:/usr/local/etc/php/custom.d"