version: '3'
services:
  # This Docker Compose file is for testing locally against a local Git repository.
  # Also, we use --canary to test only the master branch.
  # For production use datakit-ci.yml, which tests against GitHub.
  bridge:
    command: '--metadata-store tcp:datakit:5640 -v moby/datakit:/data/repos/datakit'
    image: 'datakit/local-bridge'
    links:
      - datakit
    volumes:
      - '../../.git:/data/repos/datakit/.git:ro'
  ci:
    command: '--profile=localhost --metadata-store tcp:datakit:5640 --web-ui=http://localhost:8080/ --canary=moby/datakit/heads/master'
    build: .
    links:
      - datakit
    ports:
      - '8080:8080'
    volumes:
      - '../../.git:/mnt/datakit/.git:ro'
      - '/secrets'
      - '/var/run/docker.sock:/var/run/docker.sock'
  datakit:
    user: 'root'
    command: '--git /data --listen-9p tcp://0.0.0.0:5640'
    image: 'datakit/db'
    volumes:
      - /data

version: '3'
services:
  # This Docker Compose file is for testing locally against a local Git repository.
  # Also, we use --canary to test only the master branch.
  # For production use datakit-ci.yml, which tests against GitHub.
  bridge:
    command: '--metadata-store tcp:datakit:5640 -v moby/datakit:/data/repos/datakit'
    image: 'datakit/local-bridge'
    links:
      - datakit
    volumes:
      - '../../.git:/data/repos/datakit/.git'   # XXX: should really be :ro (see #622)
  ci:
    command: '--profile=localhost --metadata-store tcp:datakit:5640 --web-ui=http://localhost:8080/ --canary=moby/datakit/heads/master'
    build: .
    links:
      - datakit
    ports:
      - '8080:8080'
    volumes:
      - '../../.git:/mnt/datakit/.git:ro'
      - '/secrets'
      - '/var/run/docker.sock:/var/run/docker.sock'
  datakit:
    user: 'root'
    command: '--git /data --listen-9p tcp://0.0.0.0:5640'
    image: 'datakit/db'
    volumes:
      - /data

Work around ocaml-git needing write access
Work around ocaml-git needing write access

Looks like it tries to write out a loose object when it reads something
from a packfile. This is fixed in the development version, but just
mount the source repository read-write for now as a work-around.

Signed-off-by: Thomas Leonard <ea62ade398c3addd3bcc52285a00e98f3b0c618f@docker.com>
