services:
  plugin-builder:
    ports:
      - 5858:5858
    build: .
    volumes:
      - ./:/app
      - /app/node_modules
      - ${GIT_DIR:-../.git}:/app/.git
      - ../.nvmrc:/app/.nvmrc
      - ../.rclone-version:/app/.rclone-version
      - ./source:/app/source
      - ./scripts:/app/scripts
      - ../unraid-ui/dist-wc:/app/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.my.servers/unraid-components/uui
      - ../web/dist:/app/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.my.servers/unraid-components/standalone
      - ../api/deploy/release/:/app/source/dynamix.unraid.net/usr/local/unraid-api # Use the release dir instead of pack to allow watcher to not try to build with node_modules
    stdin_open: true # equivalent to -i
    tty: true        # equivalent to -t
    environment:
      - HOST_LAN_IP=${HOST_LAN_IP}
      - CI=${CI:-false}
      - TAG=${TAG}
      - API_VERSION=${API_VERSION}