-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile.production
37 lines (27 loc) · 1.06 KB
/
Dockerfile.production
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
FROM ruby:3.2-slim
LABEL maintainer="[email protected]"
RUN apt-get update -yqq && \
DEBIAN_FRONTEND=noninteractive apt-get install -yqq --no-install-recommends \
automake \
autoconf \
build-essential \
curl \
default-libmysqlclient-dev \
git \
gnupg \
nodejs
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
&& apt-get update && apt-get install -y yarn && rm -rf /var/lib/apt/lists/*
RUN gem install bundler -v '>= 2'
# Throw errors if Gemfile has been modified since Gemfile.lock
RUN bundle config --global frozen 1
COPY Gemfile* /app/
WORKDIR /app
RUN bundle config set deployment 'true'
RUN bundle config set --local without 'development test'
RUN bundle install --jobs=4 --retry=3
COPY . /app/
RUN git clone --depth=1 https://github.com/quintel/etsource.git /etsource
RUN RAILS_ENV=production bundle exec rails assets:precompile
CMD ["bundle", "exec", "--keep-file-descriptors", "puma", "-C", "config/puma.rb"]