下载镜像
docker pull neo4j:5.19.0-community
docker-compose.yml
mkdir -p /opt/neo4j
cd /opt/neo4j
vim docker-compose.yml
#输入下面的内容
version: '3.9'
services:
xt-neo4j:
image: neo4j:5.19.0-community
container_name: xt-neo4j
volumes:
- ./neo4j/conf:/var/lib/neo4j/conf
- ./neo4j/import:/var/lib/neo4j/import
- ./neo4j/plugins:/plugins
- ./neo4j/data:/data
- ./neo4j/logs:/var/lib/neo4j/logs
restart: always
ports:
- 7474:7474
- 7687:7687
environment:
- NEO4J_AUTH=neo4j/000000abc
配置文件
mkdir -p config data import logs plugins
vim ./neo4j.conf
#输入下面的内容
server.memory.pagecache.size=512M
server.default_listen_address=0.0.0.0
server.directories.plugins=/plugins
server.directories.logs=/logs
启动服务
docker-compose up -d
访问
http://localhost:7474