volumes:
  stardata:
    external: false

services:
  starbot:
    build:
      context: starbot
      target: ptvp35
    volumes:
      - "./starbot/starbot:/app/starbot:ro"
      - "stardata:/app/data/:rw"
    env_file:
      - .secrets/starbot.env
    deploy:
      resources:
        limits:
          cpus: '2'
          memory: 200M
      restart_policy:
        condition: on-failure
        delay: 5s
        max_attempts: 3
        window: 120s
    tty: true
    stop_signal: SIGINT
  nightly:
    build:
      context: nightly
    volumes:
      - "./nightly/nightly:/app/nightly:ro"
    env_file:
      - .secrets/nightly.env
    deploy:
      resources:
        limits:
          cpus: '2'
          memory: 200M
      restart_policy:
        condition: on-failure
        delay: 5s
        max_attempts: 3
        window: 120s
    tty: true
    stop_signal: SIGINT