Skip to content

Commit

Permalink
Add Dockerfile
Browse files Browse the repository at this point in the history
Include testing db in container.
  • Loading branch information
icarito committed Jun 14, 2016
1 parent 02783c0 commit fb50d3d
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions Dockerfile
@@ -0,0 +1,30 @@
# Dockerfile # Spectral Workbench
# https://github.com/publiclab/spectral-workbench

FROM ruby:2.1.2
MAINTAINER Sebastian Silva "sebastian@fuentelibre.org"

LABEL "This image deploys Spectral Worbench!"

# Set correct environment variables.
RUN mkdir -p /app
ENV HOME /root

# Install dependencies
RUN apt-get update -qq && apt-get install -y imagemagick ruby-rmagick libmagickwand-dev libmagick++-dev bundler libmysqlclient-dev ruby-rmagick libfreeimage3 libfreeimage-dev ruby-dev gdal-bin python-gdal curl libcurl4-openssl-dev libssl-dev zip nodejs-legacy npm
RUN npm install -g bower

# Install bundle of gems
WORKDIR /tmp
ADD Gemfile /tmp/Gemfile
RUN bundle install
ADD Gemfile.lock /tmp/Gemfile.lock

# Add the Rails app
WORKDIR /app
ADD . /app
RUN bower install --allow-root

RUN bundle exec rake db:setup
RUN bundle exec rake db:seed
RUN bundle exec rake db:migrate

0 comments on commit fb50d3d

Please sign in to comment.