version: '3.8'

services:
  postgres:
    container_name: base_platform_postgres
    image: postgres:16
    environment:
      POSTGRES_DB: base_platform
      POSTGRES_USER: user
      POSTGRES_PASSWORD: kAvtYfAUMmwQgezaXz6Scw
    ports:
      - "5433:5432"
    volumes:
      - postgres_data:/var/lib/postgresql/data
    restart: unless-stopped

  neo4j:
    container_name: base_platform_neo4j
    image: neo4j:5.15
    environment:
      NEO4J_AUTH: neo4j/eO]AJY]bCX3Rj]s+nX+g0AJ[dGPP[P(c
    ports:
      - "7474:7474"
      - "7687:7687"
    volumes:
      - neo4j_data:/data
    restart: unless-stopped

  milvus:
    container_name: base_platform_milvus
    image: milvusdb/milvus:v2.4.0
    command: ["milvus", "run", "standalone"]
    environment:
      ETCD_ENDPOINTS: etcd:2379
      MINIO_ADDRESS: minio:9000
      MINIO_ACCESS_KEY_ID: b2ac27602fac7f83ef677a0690be5d27
      MINIO_SECRET_ACCESS_KEY: d514aec1fa5aff813de58b2380fe0d16cd39fc88dd720957aa747e6052519321
    ports:
      - "19530:19530"
    depends_on:
      - etcd
      - minio
    networks:
      default:
        aliases:
          - milvus
    restart: unless-stopped

  etcd:
    container_name: base_platform_etcd
    image: quay.io/coreos/etcd:v3.5.5
    environment:
      ETCD_AUTO_COMPACTION_MODE: revision
      ETCD_AUTO_COMPACTION_RETENTION: "1000"
      ETCD_QUOTA_BACKEND_BYTES: "4294967296"
    ports:
      - "2379:2379"
    volumes:
      - etcd_data:/etcd
    command: etcd -advertise-client-urls=http://etcd:2379 -listen-client-urls=http://0.0.0.0:2379 --data-dir=/etcd
    networks:
      default:
        aliases:
          - etcd
    restart: unless-stopped

  minio:
    container_name: base_platform_minio
    image: minio/minio:latest
    environment:
      MINIO_ROOT_USER: b2ac27602fac7f83ef677a0690be5d27
      MINIO_ROOT_PASSWORD: d514aec1fa5aff813de58b2380fe0d16cd39fc88dd720957aa747e6052519321
    ports:
      - "9000:9000"
      - "9001:9001"
    volumes:
      - minio_data:/data
    command: server /data --console-address ":9001"
    networks:
      default:
        aliases:
          - minio
    restart: unless-stopped

  redis:
    container_name: base_platform_redis
    image: redis:7-alpine
    command: redis-server --requirepass "!WO3B%Mehda>*-Zgyc0hyJg1xbUvnF1J"
    ports:
      - "6379:6379"
    volumes:
      - redis_data:/data
    restart: unless-stopped

volumes:
  postgres_data:
  neo4j_data:
  milvus_data:
  etcd_data:
  minio_data:
  redis_data:
