scinote-web/Dockerfile.production

36 lines
806 B
Text
Raw Normal View History

FROM ruby:2.3.3
MAINTAINER BioSistemika <info@biosistemika.com>
# additional dependecies
RUN apt-get update -qq && \
apt-get install -y \
nodejs \
postgresql-client \
netcat \
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
# 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 $APP_HOME/production.env
ENV RAILS_ENV=production \
DATABASE_URL=postgresql://postgres@db/scinote_production \
PAPERCLIP_HASH_SECRET=dummy \
SECRET_KEY_BASE=dummy \
DEFACE_ENABLED=true
RUN bash -c "rake assets:precompile && rake deface:precompile"
CMD rails s -b 0.0.0.0