繁体   English   中英

在 docker 中运行 neo4j:“未指定模式!”

[英]running neo4j in docker: “NO MODE SPECIFIED!”

我将 neo4j 添加到我的 docker-compose.yml 文件中。 它成功创建,但是在 docker-compose up 命令时,它为我提供了 neo4j 的两条错误消息:

   NO MODE SPECIFIED! 
   env variables are populated(think that is not important)

并兴奋

  neo4j exited with code 1

此外,我正在将 MODE 添加到环境中,但我看到的方式并没有帮助。 这就是我的 docker-compose.yml 的样子:

   neo4j:
 image: neo4j:4.0.5
 hostname: neo4j
 container_name: neo4j
 ports:
   - "7474:7474"
   - "7687:7687"
 volumes:
   - ./data:/data
 environment:
   - NEO4J_dbms_mode=CORE

这对我有用:

version: '3'
services:
  neo4j:
    image: neo4j:4.0.5
    hostname: neo4j
    container_name: neo4j
    ports:
      - "7474:7474"
      - "7687:7687"
    volumes:
      - ./data:/data
    environment:
      NEO4J_AUTH: neo4j/secret
docker-compose up
Starting neo4j ... 
Starting neo4j ... done
Attaching to neo4j
neo4j    | Warning: Folder mounted to "/data" is not writable from inside container. Changing folder owner to neo4j.
neo4j    | Changed password for user 'neo4j'.
neo4j    | Directories in use:
neo4j    |   home:         /var/lib/neo4j
neo4j    |   config:       /var/lib/neo4j/conf
neo4j    |   logs:         /logs
neo4j    |   plugins:      /var/lib/neo4j/plugins
neo4j    |   import:       /var/lib/neo4j/import
neo4j    |   data:         /var/lib/neo4j/data
neo4j    |   certificates: /var/lib/neo4j/certificates
neo4j    |   run:          /var/lib/neo4j/run
neo4j    | Starting Neo4j.
neo4j    | 2020-06-15 07:22:27.505+0000 INFO  ======== Neo4j 4.0.5 ========
neo4j    | 2020-06-15 07:22:27.510+0000 INFO  Starting...
neo4j    | 2020-06-15 07:22:30.673+0000 INFO  Bolt enabled on 0.0.0.0:7687.
neo4j    | 2020-06-15 07:22:30.673+0000 INFO  Started.
neo4j    | 2020-06-15 07:22:31.382+0000 INFO  Remote interface available at http://localhost:7474/

docker-compose.yml 文件没有问题。 我刚刚又拉了 neo4j 并重新启动了 docker。 它解决了这个问题。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM