mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-26 01:35:34 +08:00
29 lines
751 B
Text
29 lines
751 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 \
|
||
|
default-jre-headless \
|
||
|
sudo graphviz --no-install-recommends \
|
||
|
sudo libfile-mimeinfo-perl && \
|
||
|
rm -rf /var/lib/apt/lists/*
|
||
|
|
||
|
# 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
|
||
|
|
||
|
RUN bundle install
|
||
|
|
||
|
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
|