Similar to this thread
I am trying to create a test db instance on my machine in addition to the development db instance I have running. So I want the test DB spun up on a different port at the same time I have my dev db running.
This is the config I got to work, just as I was about to post this question. So I figured I would post my answer in case anyone else wants to do this.
version: "3.2"
services:
zero-test:
image: dgraph/dgraph:v1.0.3
volumes:
- type: volume
source: dgraph-test
target: /dgraph-test
volume:
nocopy: true
ports:
- 6081:6081
- 5081:5081
restart: on-failure
command: dgraph zero --port_offset 1 --my=zero-test:5081
server-test:
image: dgraph/dgraph:v1.0.3
volumes:
- type: volume
source: dgraph-test
target: /dgraph-test
volume:
nocopy: true
ports:
- 8081:8081
- 9081:9081
restart: on-failure
command: dgraph server --my=server-test:7081 --memory_mb=2048 --zero=zero-test:5081 -o 1
volumes:
dgraph-test: