scinote-web/Dockerfile.production

35 lines
806 B
Text

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/*
# 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