github.com/cayleygraph/cayley@v0.7.7/docs/container.md (about) 1 # Container 2 3 ## Running in Kubernetes 4 5 To run Cayley in K8S check [this docs section](k8s/k8s.md). 6 7 ## Running in a container 8 9 A container exposing the HTTP API of Cayley is available. 10 11 ### Running with default configuration 12 13 Container is configured to use BoltDB as a backend by default. 14 15 ```text 16 docker run -p 64210:64210 -d cayleygraph/cayley:v0.7.5 17 ``` 18 19 New database will be available at [http://localhost:64210](http://localhost:64210). 20 21 ### Custom configuration 22 23 To run the container one must first setup a data directory that contains the configuration file and optionally contains persistent files \(i.e. a boltdb database file\). 24 25 ```text 26 mkdir data 27 cp cayley_example.yml data/cayley.yml 28 cp data/testdata.nq data/my_data.nq 29 # initialize and serve database 30 docker run -v $PWD/data:/data -p 64210:64210 -d cayleygraph/cayley:v0.7.5 -c /data/cayley.yml --init -i /data/my_data.nq 31 # serve existing database 32 docker run -v $PWD/data:/data -p 64210:64210 -d cayleygraph/cayley:v0.7.5 -c /data/cayley.yml 33 ``` 34 35 ### Other commands 36 37 Container runs `cayley http` command by default. To run any other Cayley command reset the entry point for container: 38 39 ```text 40 docker run -v $PWD/data:/data cayleygraph/cayley:v0.7.5 --entrypoint=cayley version 41 ``` 42