
services:
  web:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: qris_bank_jatim
    user: "root"
    ports:
      - "3000:3000"

    volumes:
      # Mount hanya folder project, bukan seluruh root
      - ./:/app

      # Keep node_modules inside container
      - /app/node_modules

      # SMB langsung ke public/uploads
      - smb_data:/app/public/uploads

    environment:
      - NODE_ENV=development
      - HOST=0.0.0.0

    env_file:
      - .env

    working_dir: /app
    command: ["npm", "run", "dev", "--", "--host", "0.0.0.0", "--port", "3000"]

    networks:
      - qris-network

volumes:
  smb_data:
    driver: local
    driver_opts:
      type: cifs
      device: "//10.10.123.49/qris"
      o: "username=qris,password=mailadmin123,uid=1000,gid=1000,vers=3.0"

networks:
  qris-network:
    driver: bridge
