version: "2" services: db: image: mysql:5.5 environment: - MYSQL_DATABASE=plots - MYSQL_USER=plots - MYSQL_PASSWORD=plots - MYSQL_RANDOM_ROOT_PASSWORD=true volumes: - ../mysql:/var/lib/mysql # for persistence - ../dump:/docker-entrypoint-initdb.d # for importing a dump # if you want to re-import simply put away ../mysql/* solr: image: solr:5.3 ports: - "127.0.0.1:8983:8983" volumes: - solr:/opt/solr/server/solr/mycores entrypoint: - docker-entrypoint.sh - solr-precreate - default web: build: . command: /bin/bash -c "sleep 5 && bundle exec rails s -p 4000 -b '0.0.0.0'" environment: - RAILS_ENV=${RAILS_ENV} volumes: - .:/app ports: - "127.0.0.1:4000:4000" links: - db - solr # restart: unless-stopped volumes: solr: