cayleygraph / cayley

An open-source graph database
https://cayley.io
Apache License 2.0
14.83k stars 1.25k forks source link

how can I run cayley in docker #894

Closed wurangbo closed 4 years ago

wurangbo commented 4 years ago

I want to run cayley in docker and configure as below:

cayley:
    container_name: phoenix-cayley
    image: cayleygraph/cayley
    ports:
      - "64210:64210"
    environment:
      TZ: "Asia/Shanghai"
    restart: always
    volumes:
      - /etc/localtime:/etc/localtime:ro

but get error: Error: open data/cayley.db/indexes.bolt: no such file or directory

iddan commented 4 years ago

Hello, it seems like you need to init the database. To do that:

 cayley:
     container_name: phoenix-cayley
     image: cayleygraph/cayley
+    cmd: --init
     ports:
       - "64210:64210"
     environment:
       TZ: "Asia/Shanghai"
     restart: always
     volumes:
       - /etc/localtime:/etc/localtime:ro
wurangbo commented 4 years ago

thx @iddan