---
version: "3"

tasks:
  build:
    desc: "Builds Featurer's container."
    dir: "./server/localdev/featurer"
    cmds:
      - docker compose -p featurer -f docker-compose.yaml build

  down:
    desc: "Deletes all Featurer's data (down)."
    dir: "./server/localdev/featurer"
    cmds:
      - docker compose -p featurer -f docker-compose.yaml down --volumes

  logs:
    desc: "Show Featurer logs."
    dir: "./server/localdev/featurer"
    cmds:
      - docker compose -p featurer -f docker-compose.yaml logs -f

  restart:
    desc: "Restart Featurer."
    dir: "./server/localdev/featurer"
    cmds:
      - docker compose -p featurer -f docker-compose.yaml restart

  start:
    desc: "Start Featurer."
    dir: "./server/localdev/featurer"
    cmds:
      - docker compose -p featurer -f docker-compose.yaml start

  stop:
    desc: "Stop Featurer without deleting it's data."
    dir: "./server/localdev/featurer"
    cmds:
      - docker compose -p featurer -f docker-compose.yaml stop

  up:
    desc: "Start Featurer (up -d)."
    dir: "./server/localdev/featurer"
    cmds:
      - task: :common:network-up
      - task: build
      - docker compose -p featurer -f docker-compose.yaml up -d
