mysql:
    image: autopilotpattern/mysql:latest
    mem_limit: 4g
    restart: always
    # expose for linking, but each container gets a private IP for
    # internal use as well
    expose:
      - 3306
    labels:
      - triton.cns.services=mysql
    env_file: _env
    environment:
      - CONTAINERPILOT=file:///etc/containerpilot.json
      - CONSUL_AGENT=1
      - LOG_LEVEL=INFO
      - SERVICE_NAME=mysql

consul:
    image: consul:0.7.1
    command: >
      agent -server -client=0.0.0.0 -bootstrap -ui
    restart: always
    mem_limit: 128m
    ports:
      - 8500
    expose:
      - 53
      - 8300
      - 8301
      - 8302
      - 8400
      - 8500
    dns:
      - 127.0.0.1
    labels:
      - triton.cns.services=consul

version: '2.1'

services:
  mysql:
    image: autopilotpattern/mysql:${TAG:-latest}
    mem_limit: 4g
    restart: always
    # expose for linking, but each container gets a private IP for
    # internal use as well
    expose:
      - 3306
    labels:
      - triton.cns.services=mysql
    env_file: _env
    network_mode: bridge
    environment:
      - CONTAINERPILOT=file:///etc/containerpilot.json
      - CONSUL_AGENT=1
      - LOG_LEVEL=INFO
      - SERVICE_NAME=mysql

  consul:
    image: consul:0.7.1
    command: >
      agent -server -client=0.0.0.0 -bootstrap -ui
    restart: always
    mem_limit: 128m
    ports:
      - 8500
    expose:
      - 53
      - 8300
      - 8301
      - 8302
      - 8400
      - 8500
    network_mode: bridge
    dns:
      - 127.0.0.1
    labels:
      - triton.cns.services=consul

Revert undoing Compose 2.1 syntax by using bridge mode
Revert undoing Compose 2.1 syntax by using bridge mode
