services:
  zerobyte-dev:
    build:
      context: .
      dockerfile: Dockerfile
      target: development
    container_name: zerobyte
    restart: unless-stopped
    devices:
      - /dev/fuse:/dev/fuse
    cap_add:
      - SYS_ADMIN
    environment:
      - NODE_ENV=development
      # - SMB_PASSWORD=secret
    ports:
      - "4096:4096"
    # secrets:
    #   - smb-password
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /var/lib/zerobyte:/var/lib/zerobyte

      - ./app:/app/app
      - ~/.config/rclone:/root/.config/rclone

  zerobyte-prod:
    build:
      context: .
      dockerfile: Dockerfile
      target: production
    container_name: zerobyte
    restart: unless-stopped
    devices:
      - /dev/fuse:/dev/fuse
    cap_add:
      - SYS_ADMIN
    ports:
      - "4096:4096"
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /var/lib/zerobyte:/var/lib/zerobyte
      - ~/.config/rclone:/root/.config/rclone

# secrets:
#   smb-password:
#     file: ./smb-password.txt
