version: '3.8'

services:
  dashboard-app-dev:
    build:
      context: .
      dockerfile: Dockerfile
    ports:
      - '3008:3000'
    volumes:
      # Mount source code for hot reloading
      - .:/app
      # Exclude node_modules to use container's version
      - /app/node_modules
    environment:
      - NODE_ENV=development
      - CHOKIDAR_USEPOLLING=true
      - WATCHPACK_POLLING=true
      - REACT_APP_API_URL=${REACT_APP_API_URL:-https://amazon.fascano.com}
    env_file:
      - .env.develop
    stdin_open: true
    tty: true
    networks:
      - dashboard-network

networks:
  dashboard-network:
    driver: bridge
