services:
  sbws:
    build:
      context: ./
      args:
          UID: '${UID:-1000}'
          GID: '${GID:-1000}'
    image: sbws
    user: "${UID:-1000}:${GID:-1000}"
    environment:
      - UID=${UID}
      - GID=${GID}
    volumes:
      - ./data/.sbws.ini:/home/sbws/.sbws.ini
      - ./data/.sbws:/home/sbws/.sbws
    # environment:
    #   SUPERVISED: 1
    command: sbws scanner

  cron:
    image: sbws
    entrypoint: /bin/bash
    command: ["cron", "-f"]
    user: "${UID:-1000}:${GID:-1000}"
    environment:
      - UID=${UID}
      - GID=${GID}
    volumes:
      - ./data/.sbws.ini:/home/sbws/.sbws.ini
      - ./data/.sbws:/home/sbws/.sbws
