services:
  doris-barbell:
    container_name: doris-barbell
    build:
      context: .
      dockerfile: Dockerfile
    restart: unless-stopped
    ports:
      - "8093:8093"
    env_file:
      - .env
    environment:
      TZ: ${TZ}
      BARBELL_HOST: ${BARBELL_HOST:-0.0.0.0}
      BARBELL_PORT: ${BARBELL_PORT:-8093}
      BARBELL_STATE_DIR: ${BARBELL_STATE_DIR:-/data/state}
      BARBELL_SHARED_PASSWORD: ${BARBELL_SHARED_PASSWORD:-}
    volumes:
      - /mnt/docker-ssd/docker/appdata/doris-barbell:/data
    healthcheck:
      test: ["CMD-SHELL", "curl -fsS http://127.0.0.1:8093/api/health || exit 1"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 20s
    networks:
      - doris-barbell-net

networks:
  doris-barbell-net:
    driver: bridge
