-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
31 lines (21 loc) · 625 Bytes
/
Dockerfile
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
FROM ruby:3.3.4-alpine as builder
WORKDIR /usr/src/app
RUN apk --no-cache add build-base \
libpq-dev \
libffi-dev \
openssl-dev
RUN bundle config --global frozen 1
COPY Gemfile Gemfile.lock /usr/src/app/
RUN bundle config set --without 'development test' \
&& bundle install --jobs=3 --retry=3
# Production
FROM ruby:3.3.4-alpine as production
ENV TINI_SUBREAPER=true
WORKDIR /usr/src/app
RUN apk add --no-cache tini \
libpq-dev
COPY --from=builder /usr/local/bundle/ /usr/local/bundle/
COPY . /usr/src/app
EXPOSE 3000
ENTRYPOINT ["tini", "--"]
CMD ["bundle", "exec", "puma", "-C", "config/puma/puma.rb"]