version: "2"
services:
  builder:
    image: openlmis/dev:1
    links:
      - db
      - log
    volumes:
      - '.:/app'
      - '../logback.xml:/logback.xml'
    command:
      - './build.sh'
    environment:
      GRADLE_OPTS: '-Dorg.gradle.daemon=false'
      JAVA_OPTS: '-Dlogging.config=/logback.xml'
    env_file: .env
  sonar:
    image: openlmis/dev:1
    links:
      - db
      - log
    volumes:
      - '.:/app'
    entrypoint:
      - 'gradle'
    command:
      - 'clean'
      - 'sonarqube'
    environment:
      GRADLE_OPTS: '-Dorg.gradle.daemon=false $SONAR_LOGIN $SONAR_PASSWORD'
    env_file: .env
  image:
    build: .
    image: openlmis/template-service
  db:
    image: openlmis/postgres:9.4
    env_file: .env
  log:
    image: openlmis/rsyslog:1
    volumes:
      - '../logs/template-service:/var/log'

version: "2"
services:
  builder:
    image: openlmis/dev:1
    links:
      - db
      - log
    volumes:
      - '.:/app'
      - '../logback.xml:/logback.xml'
    command:
      - './build.sh'
    environment:
      GRADLE_OPTS: '-Dorg.gradle.daemon=false'
      JAVA_OPTS: '-Dlogging.config=/logback.xml'
    env_file: .env
  sonar:
    image: openlmis/dev:1
    volumes:
      - '.:/app'
    entrypoint:
      - 'gradle'
    command:
      - 'clean'
      - 'sonarqube'
    environment:
      GRADLE_OPTS: '-Dorg.gradle.daemon=false $SONAR_LOGIN $SONAR_PASSWORD'
    env_file: .env
  image:
    build: .
    image: openlmis/template-service
  db:
    image: openlmis/postgres:9.4
    env_file: .env
  log:
    image: openlmis/rsyslog:1
    volumes:
      - '../logs/template-service:/var/log'

Remove unneeded db and log links
Remove unneeded db and log links

Sonarqube run doesn’t need these as it doesn’t run integration tests.
