# NOTE: an easy way to setup the values for the variable substitions is to create a .env file in this same directory
#       more information can be found here: http://docs.master.dockerproject.org/compose/env-file/

version: '2'
services:
  app:
    build:
      context: .
      dockerfile: Dockerfile-dev
    command: docker/dev/run.sh
    environment:
      DB_HOST: mysql
      DB_NAME: portal
      DB_USER: master
      DB_PASSWORD: master
      SOLR_HOST: solr
      SOLR_PORT: 8983
    ports:
      - 3000:3000
    volumes:
      - .:/rigse
      - bundle:/bundle
  solr:
    image: concordconsortium/docker-solr-portal
    ports:
      - 8983:8983
    volumes:
      - .:/rigse
      - data:/opt/solr/server/solr/mycores
    depends_on:
      - solrdata
    command: /bin/bash ./start-solr.sh
  solrdata:
    image: concordconsortium/docker-solr-portal
    volumes:
      - data:/opt/solr/server/solr/mycores
    user:
      root
    command: /bin/bash ./start-volume.sh
  mysql:
    image: mysql:5.6
    environment:
      MYSQL_DATABASE: portal
      MYSQL_PASSWORD: master
      MYSQL_USER: master
      MYSQL_ROOT_PASSWORD: xyzzy
    command: mysqld --character-set-server=utf8 --collation-server=utf8_general_ci
volumes:
  bundle:
  data:

# NOTE: an easy way to setup the values for the variable substitions is to create a .env file in this same directory
#       more information can be found here: http://docs.master.dockerproject.org/compose/env-file/

version: '2'
services:
  app:
    build:
      context: .
      dockerfile: Dockerfile-dev
    command: docker/dev/run.sh
    environment:
      DB_HOST: mysql
      DB_NAME: portal
      DB_USER: master
      DB_PASSWORD: master
      SOLR_HOST: solr
      SOLR_PORT: 8983
    ports:
      - 3000:3000
    volumes:
      - .:/rigse
      - bundle:/bundle
  solr:
    image: concordconsortium/docker-solr-portal
    ports:
      - 8983:8983
    volumes:
      - .:/rigse
    command: /bin/bash ./start-solr.sh
  mysql:
    image: mysql:5.6
    environment:
      MYSQL_DATABASE: portal
      MYSQL_PASSWORD: master
      MYSQL_USER: master
      MYSQL_ROOT_PASSWORD: xyzzy
    command: mysqld --character-set-server=utf8 --collation-server=utf8_general_ci
volumes:
  bundle:

Remove the solrdata container and volume
Remove the solrdata container and volume

It is quick to re-index the solr data especially in a development environment
So the extra complexity of the data container doesn’t seem worth it.
Even in production it might not be worth it.
