version: '3'

services:
  # Application Service1
  marketbin1:
    #network_mode: webapp
    container_name: marketbin1
    restart: always
    build: 
      context: ./
      dockerfile: Dockerfile
    volumes:
      - ./.env.prod:/var/www/html/marketbin/.env
      # para que tenga acceso al index.php
      - ./public:/var/www/html/marketbin/public
      # Para que resulten los cambios de app, resources, sin ejecutar nuevamente el docker-compose
      - ./app:/var/www/html/marketbin/app
      - ./resources:/var/www/html/marketbin/resources
      # para que tenga acceso al storage
      - ./storage:/var/www/html/marketbin/storage
      # para guardar archivos dinámicos. Nota: solo se guardaran en storage_files
      - /home/sisfac/repos/storage_files/marketbin/img/company:/var/www/html/marketbin/public/img/company
      - /home/sisfac/repos/storage_files/marketbin/img/articles:/var/www/html/marketbin/public/img/articles
    ports:
      - "9000:80"
    working_dir: /var/www/html/marketbin # cuando inspecciona; redirije a la carpta
    # red
    networks:

      - webapp
networks:
  webapp:
    external: true