1、docker-compose安装neo4j
目录结构如下:
编辑docker-compose.yml
version: '3' services: neo4j: image: neo4j:3.4.7 volumes: - ./conf:/var/lib/neo4j/conf #数据卷,前面是宿主机目录,后面是容器目录 - ./mnt:/var/lib/neo4j/import - ./plugins:/plugins - ./data:/data restart: always ports: - 7474:7474 - 7687:7687 environment: - NEO4J_dbms_memory_heap_maxSize=4G - NEO4J_AUTH=neo4j/123456 #修改默认用户密码
在docker-compose.yml目录下启动
docker-compose -f docker-compose.yml up -d