下载镜像
docker pull neo4j:3.5.22-community
编写配置文件
参考文档文章来源:https://www.toymoban.com/news/detail-768548.html
编写docker-compose.yml文件
version: "3"
services:
neo4j:
image: neo4j:3.5.22-community
container_name: neo4j
restart: always
ports:
- 7474:7474
- 7687:7687
environment:
- NEO4J_AUTH:neo4j/neofj
- TZ:Asia/Shanghai
volumes:
- /etc/localtime:/etc/localtime:ro
- /root/neo4j/data:/data
- /root/neo4j/logs:/logs
- /root/neo4j/conf:/var/lib/neo4j/conf
- /root/neo4j/import:/var/lib/neo4j/import
logging:
driver: "json-file"
options:
max-size: "10m"
networks:
default:
external:
name: my-docker-compose-network
一键启动
docker-compose up -d
文章来源地址https://www.toymoban.com/news/detail-768548.html
到了这里,关于docker-compose一键启动neo4j的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!