docker-compose.yaml raw

   1  # Docker Compose file for Neo4j test database
   2  # Usage: docker compose up -d && go test ./pkg/neo4j/... && docker compose down
   3  services:
   4    neo4j-test:
   5      image: neo4j:5.15.0-community
   6      container_name: neo4j-test
   7      ports:
   8        - "7687:7687"  # Bolt protocol
   9        - "7474:7474"  # HTTP (browser interface)
  10      environment:
  11        - NEO4J_AUTH=neo4j/testpassword
  12        - NEO4J_PLUGINS=["apoc"]
  13        - NEO4J_dbms_security_procedures_unrestricted=apoc.*
  14        - NEO4J_dbms_memory_heap_initial__size=512m
  15        - NEO4J_dbms_memory_heap_max__size=1g
  16        - NEO4J_dbms_memory_pagecache_size=512m
  17      healthcheck:
  18        test: ["CMD", "cypher-shell", "-u", "neo4j", "-p", "testpassword", "RETURN 1"]
  19        interval: 5s
  20        timeout: 10s
  21        retries: 10
  22        start_period: 30s
  23      tmpfs:
  24        - /data  # Use tmpfs for faster tests
  25