A bigger dataset into docker-compose setup

A bigger dataset

From: https://tour.dgraph.io/moredata/1/#user

Can you load 1million.rdf.gz?

I docker-compose up -d the following yml:

version: "3.2"
services:
  zero:
    image: dgraph/dgraph:latest
    volumes:
      - /private/dgraph:/dgraph
    ports:
      - 5080:5080
      - 6080:6080
    restart: on-failure
    command: dgraph zero --my=zero:5080
  server:
    image: dgraph/dgraph:latest
    volumes:
      - /private/dgraph:/dgraph
    ports:
      - 8080:8080
      - 9080:9080
    restart: on-failure
    command: dgraph alpha --my=server:7080 --lru_mb=4096 --zero=zero:5080
  ratel:
    image: dgraph/dgraph:latest
    ports:
      - 8000:8000
    command: dgraph-ratel

docker exec

I tried to docker exec into zero, alpha and ratel and I get:

docker exec -it <zero, alpha and ratel> dgraph live -f 1million.rdf.gz --alpha localhost:9080 --zero localhost:5080 -c 1

While trying to setup connection: context deadline exceeded. Retrying...
or

context deadline exceeded

Unable to connect to zero, Is it running at localhost:5080?

github.com/dgraph-io/dgraph/x.Checkf

/tmp/go/src/github.com/dgraph-io/dgraph/x/error.go:49

github.com/dgraph-io/dgraph/dgraph/cmd/live.setup

/tmp/go/src/github.com/dgraph-io/dgraph/dgraph/cmd/live/run.go:245

github.com/dgraph-io/dgraph/dgraph/cmd/live.run

/tmp/go/src/github.com/dgraph-io/dgraph/dgraph/cmd/live/run.go:299

github.com/dgraph-io/dgraph/dgraph/cmd/live.init.0.func1

/tmp/go/src/github.com/dgraph-io/dgraph/dgraph/cmd/live/run.go:80

github.com/dgraph-io/dgraph/vendor/github.com/spf13/cobra.(*Command).execute

/tmp/go/src/github.com/dgraph-io/dgraph/vendor/github.com/spf13/cobra/command.go:702

github.com/dgraph-io/dgraph/vendor/github.com/spf13/cobra.(*Command).ExecuteC

/tmp/go/src/github.com/dgraph-io/dgraph/vendor/github.com/spf13/cobra/command.go:783

github.com/dgraph-io/dgraph/vendor/github.com/spf13/cobra.(*Command).Execute

/tmp/go/src/github.com/dgraph-io/dgraph/vendor/github.com/spf13/cobra/command.go:736

github.com/dgraph-io/dgraph/dgraph/cmd.Execute

/tmp/go/src/github.com/dgraph-io/dgraph/dgraph/cmd/root.go:68

main.main

/tmp/go/src/github.com/dgraph-io/dgraph/dgraph/main.go:33

runtime.main

/usr/local/go/src/runtime/proc.go:200

runtime.goexit

/usr/local/go/src/runtime/asm_amd64.s:1337

I think the name of the composed containers isn’t “dgraph” in the case of Docker Compose. Run docker ps and check the name or the container ID to then do a docker exec.

You are right, the name is not dgraph. Just updated. I tried with every docker ps name: zero, alpha and ratel. Using compose it creates names like: compose_ratel_1, compose_server_1 and compose_zero_1.

Non of them works?

Well, if you need I have some scripts for this. GitHub - MichelDiz/Dgraph-Bulk-Script: Just a simple Sh to use Dgraph's Bulk Loader.
You just need to update the RDF and the Schema in the “service” folder.