# Separate instances of Dgraph (Docker question)

**URL:** <https://discuss.dgraph.io/t/separate-instances-of-dgraph-docker-question/2604>\
**Category:** Users\
**Created:** [May 19, 2018, 9:24pm UTC](https://discuss.dgraph.io/t/separate-instances-of-dgraph-docker-question/2604 "2018-05-19T21:24:45Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![vespertilian](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/vespertilian/32/1132_2.png) [@vespertilian](https://discuss.dgraph.io/u/vespertilian)\
**Post date:** [May 20, 2018, 11:56pm UTC](https://discuss.dgraph.io/t/separate-instances-of-dgraph-docker-question/2604/4 "2018-05-20T23:56:01Z")

</div>

@good-idea

Are you doing this?

> **[Seperate Dev and Test instances of DGraph](https://discuss.dgraph.io/t/seperate-dev-and-test-instances-of-dgraph/2338/2)**
>
> Quick note If have two docker compose files in the same directory, one test, one dev. Add a -p “project” flag to when calling docker compose up or you can get project collisions. docker-compose -f docker-compose.dev.yml -p dgraph-dev up -d and ...

This was the key for me to have both run with no issues.

Below are my two configs, which have been working for me since March.

```auto
docker-compose -f docker-compose.dev.yml -p dgraph-dev up -d
docker-compose -f docker-compose.test.yml -p dgraph-test up -d

```

### dgraph-dev

```auto
version: "3.2"
services:
  zero:
    image: dgraph/dgraph:v1.0.5
    volumes:
      - type: volume
        source: dgraph
        target: /dgraph
        volume:
          nocopy: true
    ports:
      - 5080:5080
      - 6080:6080
    restart: on-failure
    command: dgraph zero --my=zero:5080
  server:
    image: dgraph/dgraph:v1.0.5
    volumes:
      - type: volume
        source: dgraph
        target: /dgraph
        volume:
          nocopy: true
    ports:
      - 8080:8080
      - 9080:9080
    restart: on-failure
    command: dgraph server --my=server:7080 --lru_mb=2048 --zero=zero:5080
  ratel:
    image: dgraph/dgraph:v1.0.5
    volumes:
      - type: volume
        source: dgraph
        target: /dgraph
        volume:
          nocopy: true
    ports:
      - 8000:8000
    command: dgraph-ratel

volumes:
  dgraph:

```

### dgraph-test

```auto
version: "3.2"
services:
  zero-test:
    image: dgraph/dgraph:v1.0.5
    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.5
    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 --lru_mb=1024 --zero=zero-test:5081 -o 1

volumes:
  dgraph-test:

```

---

_[View the full topic](https://discuss.dgraph.io/t/separate-instances-of-dgraph-docker-question/2604)._
