name: roaring-kitty-tracker

services:
  dashboard:
    build:
      context: ..
      dockerfile: deploy/Dockerfile
    environment:
      RKT_HOST: 0.0.0.0
      RKT_PORT: 8765
      RKT_OPEN_BROWSER: "0"
    volumes:
      - tracker-data:/app/data
      - tracker-sec-cache:/app/.cache_sec_companyfacts
    networks:
      public-edge:
        aliases:
          - roaring-kitty-dashboard
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "python3", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8765/healthz', timeout=5)"]
      interval: 30s
      timeout: 5s
      retries: 3
      start_period: 10s

  refresh:
    build:
      context: ..
      dockerfile: deploy/Dockerfile
    command: ["/bin/bash", "/app/run_all.sh"]
    environment:
      UNIVERSE_CSV: data/us_universe.csv
      PYTHONUNBUFFERED: "1"
    volumes:
      - tracker-data:/app/data
      - tracker-sec-cache:/app/.cache_sec_companyfacts
    networks:
      - public-edge
    profiles: ["refresh"]
    restart: "no"

volumes:
  tracker-data:
    external: true
    name: roaring-kitty-tracker_tracker-data
  tracker-sec-cache:

networks:
  public-edge:
    external: true
    name: ontospace_tachyon_default
