Skip to content

Instantly share code, notes, and snippets.

@didicodethat
Created November 18, 2016 11:59
Show Gist options
  • Select an option

  • Save didicodethat/59fe69e8d07b19b9d33fb6dbbeee8ec3 to your computer and use it in GitHub Desktop.

Select an option

Save didicodethat/59fe69e8d07b19b9d33fb6dbbeee8ec3 to your computer and use it in GitHub Desktop.
version: '2'
services:
solr:
build: /Users/mauriciofidalgo/projects/solr/classificados
command: java -jar /var/lib/solr/start.jar
ports:
- "8951:8951"
# db:
# image: postgres
web:
build: .
command: bundle exec rails s -p 3005 -b '0.0.0.0'
environment:
- SOLR_URL=http://solr:8951/solr/
volumes:
- .:/myapp
volumes_from:
- box
ports:
- "3005:3005"
links:
- solr:solr
depends_on:
# - db
- solr
box:
image: busybox
volumes:
- /box
FROM openjdk:7
COPY . /var/lib/solr
WORKDIR /var/lib/solr
FROM ruby:2.3.1
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs
RUN mkdir /myapp
WORKDIR /myapp
ADD Gemfile /myapp/Gemfile
ADD Gemfile.lock /myapp/Gemfile.lock
ENV BUNDLE_PATH /box
RUN echo "Execute the bundle install on the web container with docker-compose run web bundle install"
ADD . /myapp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment