Add Dockerfile and docker-compose config

This commit is contained in:
Lars Henrik Mai 2016-01-23 20:33:02 +01:00
parent 0a702a18be
commit 1b60c08e9f
3 changed files with 32 additions and 0 deletions

5
.dockerignore Normal file
View file

@ -0,0 +1,5 @@
tmp
log
.vagrant
.git
coverage

15
Dockerfile Normal file
View file

@ -0,0 +1,15 @@
FROM ruby:2.2
RUN apt-get update && apt-get install -y build-essential zlib1g-dev libsqlite3-dev nodejs nodejs-legacy
RUN mkdir -p /app
WORKDIR /tmp
COPY Gemfile Gemfile
COPY Gemfile.lock Gemfile.lock
RUN bundle install
ADD . /app
WORKDIR /app
EXPOSE 3000
CMD ["rails", "server", "-b", "0.0.0.0"]

12
docker-compose.yml Normal file
View file

@ -0,0 +1,12 @@
web:
build: .
volumes:
- .:/app
ports:
- "3000:3000"
links:
- elasticsearch
environment:
ELASTICSEARCH_URL: 'http://elasticsearch:9200'
elasticsearch:
image: elasticsearch:1.7