forked from publiclab/spectral-workbench
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
34 lines (27 loc) · 1.04 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Dockerfile # Spectral Workbench
# https://github.com/publiclab/spectral-workbench
FROM ruby:2.1
LABEL maintainer="Sebastian Silva <sebastian@fuentelibre.org>"
LABEL description="This image deploys Spectral Worbench!"
# Set correct environment variables.
RUN mkdir -p /app
ENV HOME /root
# Install dependencies
RUN sed -i '/.*jessie-updates.*/d' /etc/apt/sources.list
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
ADD Gemfile.lock /tmp/Gemfile.lock
RUN bundle install
# Add the Rails app
WORKDIR /app
ADD . /app
ENV GIT_DIR=/app
RUN bower install --allow-root
COPY config/database.yml.example config/database.yml
COPY config/config.yml.example config/config.yml
RUN bundle exec rake db:setup
RUN bundle exec rake db:seed
RUN bundle exec rake db:migrate