-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.prod
39 lines (32 loc) · 1.05 KB
/
Dockerfile.prod
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
38
39
FROM ruby:3.2.2-slim-bookworm
RUN apt update -qq && apt upgrade -y && apt-get install -y \
build-essential \
shared-mime-info \
curl \
libpq-dev \
libvips
RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - && \
apt-get install -y nodejs && \
corepack enable && corepack prepare yarn@stable --activate
WORKDIR /app
ENV RAILS_ENV production
ENV RAILS_SERVE_STATIC_FILES true
ENV RAILS_LOG_TO_STDOUT true
COPY .ruby-version .ruby-version
COPY Gemfile Gemfile.lock ./
COPY config.ru config.ru
COPY Rakefile Rakefile
COPY bin bin/
COPY config config/
COPY db db/
COPY lib lib/
COPY app app/
COPY public public/
COPY vendor vendor/
RUN mkdir -p tmp/pids
RUN gem install bundler
RUN bundle install --without development test
RUN SECRET_KEY_BASE=`bin/rake secret` bin/rake assets:precompile --trace
VOLUME ["/app/public"]
EXPOSE 3000
CMD bundle exec puma -C config/puma.rb