2017-03-17 17:48:20 +08:00
|
|
|
FROM ruby:2.3.3
|
|
|
|
MAINTAINER BioSistemika <info@biosistemika.com>
|
|
|
|
|
|
|
|
# additional dependecies
|
|
|
|
RUN apt-get update -qq && \
|
|
|
|
apt-get install -y \
|
|
|
|
nodejs \
|
|
|
|
postgresql-client \
|
|
|
|
default-jre-headless \
|
|
|
|
sudo graphviz --no-install-recommends \
|
|
|
|
sudo libfile-mimeinfo-perl && \
|
|
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
|
2017-03-28 03:04:47 +08:00
|
|
|
# install gems
|
|
|
|
COPY Gemfile* /tmp/
|
|
|
|
WORKDIR /tmp
|
|
|
|
RUN bundle install
|
|
|
|
|
2017-03-17 17:48:20 +08:00
|
|
|
# create app directory
|
|
|
|
ENV APP_HOME /usr/src/app
|
|
|
|
RUN mkdir $APP_HOME
|
|
|
|
WORKDIR $APP_HOME
|
|
|
|
COPY . .
|
|
|
|
RUN rm -f $APP_HOME/config/application.yml
|
|
|
|
RUN rm -f $APP_HOME/production.env
|
|
|
|
|
|
|
|
ENV RAILS_ENV production
|
|
|
|
ENV DATABASE_URL=postgresql://postgres@db/scinote_production
|
|
|
|
RUN bash -c "PAPERCLIP_HASH_SECRET=$(openssl rand -base64 128 | tr -d '\n') SECRET_KEY_BASE=$(openssl rand -hex 64) rake assets:precompile"
|
|
|
|
|
|
|
|
CMD rails s -b 0.0.0.0
|