dgraph docker compose whitelist ip
1
curl -X POST localhost:8080/admin/schema --data-binary '@schema.graphql'
2
{"errors":[{"message":"resolving updateGQLSchema failed because unauthorized ip address: 172.23.0.1 (Locations: [{Line: 3, Column: 4}])","extensions":{"code":"Error"}}]}⏎
Copied!
Apparently I need to whitelist my host ip address. --whitelist on alpha.
1
dgraph alpha --my=alpha:7080 --zero=zero:5080 --whitelist="0.0.0.0/0"
Copied!
This is the full docker-compose file
1
# This Docker Compose file can be used to quickly bootup Dgraph Zero
2
# and Alpha in different Docker containers.
3
​
4
# It mounts /tmp/data on the host machine to /dgraph within the
5
# container. You can change /tmp/data to a more appropriate location.
6
# Run `docker-compose up` to start Dgraph.
7
​
8
version: "3.2"
9
services:
10
zero:
11
image: dgraph/dgraph:latest
12
volumes:
13
- /tmp/data:/dgraph
14
ports:
15
- 5080:5080
16
- 6080:6080
17
restart: on-failure
18
command: dgraph zero --my=zero:5080
19
alpha:
20
image: dgraph/dgraph:latest
21
volumes:
22
- /tmp/data:/dgraph
23
ports:
24
- 8080:8080
25
- 9080:9080
26
restart: on-failure
27
command: dgraph alpha --my=alpha:7080 --zero=zero:5080 --whitelist="0.0.0.0/0"
28
ratel:
29
image: dgraph/dgraph:latest
30
ports:
31
- 8000:8000
32
command: dgraph-ratel
Copied!
Last modified 1mo ago
Copy link