Docker-compose dgraph/standalone

Report a Dgraph Bug

Unable to get the dgraph/standalone docker image to work with docker-compose. Most likely issue is user error but I have been unable to find a working example.

Steps to reproduce the issue (command/config used to run Dgraph).

Here is the relevant section of the docker compose file:

dgraph-standalone:
    image: dgraph/standalone:latest
    volumes:
      - /tmp/data:/dgraph
    ports:
      - 5080:5080
      - 6080:6080
      - 8080:8080
      - 9080:9080
      - 8000:8000

Expected behaviour and actual result.

Error:

dgraph-standalone_1  | E0617 22:58:52.216163      42 groups.go:1177] Error during SubscribeForUpdates for prefix "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15dgraph.graphql.schema\x00": Unable to find any servers for group: 1. closer err: <nil>

I’m guessing this is a result of dgraph zero not being run. However, if I run dgraph zero with the following config, then ratel is no longer available on port 8000.

  dgraph-standalone:
    image: dgraph/standalone:latest
    volumes:
      - /tmp/data:/dgraph
    ports:
      - 5080:5080
      - 6080:6080
      - 8080:8080
      - 9080:9080
      - 8000:8000
    command: dgraph zero --my=zero:5080

The standalone container just runs both an alpha and zero process in one container:

dgraph zero & dgraph alpha

So it should have both running. When you change the command in your snippet, you are only running the zero.

Ratel is not running in that container but can be accessed at play.dgraph.io and connecting to your local instance. (Or by running it’s container in your compose setup)

Thanks, @iluminae!