# dgraph docker compose whitelist ip

When using <https://github.com/dgraph-io/dgraph/blob/master/contrib/config/docker/docker-compose.yml> file. I found an error

```
 curl -X POST localhost:8080/admin/schema --data-binary '@schema.graphql'
{"errors":[{"message":"resolving updateGQLSchema failed because unauthorized ip address: 172.23.0.1 (Locations: [{Line: 3, Column: 4}])","extensions":{"code":"Error"}}]}⏎
```

Apparently I need to whitelist my host ip address. `--whitelist` on alpha.

```
dgraph alpha --my=alpha:7080 --zero=zero:5080 --whitelist="0.0.0.0/0"
```

This is the full docker-compose file

```
# This Docker Compose file can be used to quickly bootup Dgraph Zero
# and Alpha in different Docker containers.

# It mounts /tmp/data on the host machine to /dgraph within the
# container. You can change /tmp/data to a more appropriate location.
# Run `docker-compose up` to start Dgraph.

version: "3.2"
services:
  zero:
    image: dgraph/dgraph:latest
    volumes:
      - /tmp/data:/dgraph
    ports:
      - 5080:5080
      - 6080:6080
    restart: on-failure
    command: dgraph zero --my=zero:5080
  alpha:
    image: dgraph/dgraph:latest
    volumes:
      - /tmp/data:/dgraph
    ports:
      - 8080:8080
      - 9080:9080
    restart: on-failure
    command: dgraph alpha --my=alpha:7080 --zero=zero:5080 --whitelist="0.0.0.0/0"
  ratel:
    image: dgraph/dgraph:latest
    ports:
      - 8000:8000
    command: dgraph-ratel
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://til.yulrizka.com/dgraph/dgraph-docker-compose-whitelist-ip.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
