forked from publiclab/spectral-workbench
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include testing db in container.
- Loading branch information
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |