evrone/evrone_opensource

View on GitHub
Dockerfile.prod

Summary

Maintainability
Test Coverage
FROM ruby:2.7.1-alpine
 
WORKDIR /srv/app
 
# setup env
ENV RAILS_ENV=production
ENV NODE_ENV=production
 
# install dependencies for
# nokogiri, pg, pzinfo-data, webpack
RUN apk add --update --no-cache \
build-base \
postgresql-dev \
tzdata \
nodejs yarn \
git
 
COPY Gemfile Gemfile.lock ./
RUN bundle install --jobs 4
 
COPY package.json yarn.lock ./
RUN yarn install
 
COPY . .
 
# precompile assets
RUN SECRET_KEY_BASE=1 bundle exec rails assets:precompile