File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Make sure it matches the Ruby version in .ruby-version and Gemfile
2+ ARG RUBY_VERSION=3.2.2
3+ FROM ruby:$RUBY_VERSION
4+
5+ # Install libvips for Active Storage preview support
6+ RUN apt-get update -qq && \
7+ apt-get install -y build-essential libvips && \
8+ apt-get clean && \
9+ rm -rf /var/lib/apt/lists/* /usr/share/doc /usr/share/man
10+
11+ # Rails app lives here
12+ WORKDIR /rails
13+
14+ # Set production environment
15+ ENV RAILS_LOG_TO_STDOUT="1" \
16+ RAILS_SERVE_STATIC_FILES="true" \
17+ RAILS_ENV="production" \
18+ BUNDLE_WITHOUT="development"
19+
20+ # Install application gems
21+ COPY Gemfile Gemfile.lock ./
22+ RUN bundle install
23+
24+ # Copy application code
25+ COPY . .
26+
27+ # Precompile bootsnap code for faster boot times
28+ RUN bundle exec bootsnap precompile --gemfile app/ lib/
29+
30+ # Precompiling assets for production without requiring secret RAILS_MASTER_KEY
31+ RUN SECRET_KEY_BASE_DUMMY=1 bundle exec rails assets:precompile
32+
33+ # Entrypoint prepares the database.
34+ ENTRYPOINT ["/rails/bin/docker-entrypoint" ]
35+
36+ # Start the server by default, this can be overwritten at runtime
37+ EXPOSE 3000
38+ CMD ["./bin/rails" , "server" ]
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
33
44ruby "3.2.2"
55
6- gem "rails" , "~> 7.1.0 "
6+ gem "rails" , "~> 7.1.4 "
77
88gem "chronic" , "~> 0.10.2"
99
You can’t perform that action at this time.
0 commit comments