-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
38 lines (28 loc) · 1.07 KB
/
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
32
33
34
35
36
37
38
FROM ruby:3.3.4
RUN apt-get update -qq && apt-get install -y nodejs postgresql-client vim && \
apt-get install -y --allow-unauthenticated ghostscript && \
apt-get install -y yarn && \
apt-get install -y imagemagick && \
apt-get install -y libvips-tools && \
apt-get install -y locales && \
apt-get install -y libpq-dev && \
apt-get install -y dumb-init
RUN apt-get install -y libjemalloc2
ENV BUNDLER_VERSION=2.5.16 \
LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.2 \
MALLOC_CONF=background_thread:true,metadata_thp:auto,dirty_decay_ms:5000,muzzy_decay_ms:5000,narenas:2 \
RUBY_YJIT_ENABLE=1 \
OVERMIND_AUTO_RESTART=all \
OVERMIND_SHOW_TIMESTAMPS=1 \
RAILS_ENV=production \
RACK_ENV=production \
RUBYOPT="-W:no-deprecated -W:no-experimental"
RUN gem install overmind
RUN gem install bundler -v 2.5.16
WORKDIR /app
COPY .ruby-version Gemfile Gemfile.lock ./
RUN bundle check || bundle install
COPY . /app
RUN chmod +x /app/entrypoint/entrypoint.sh
EXPOSE 3000
ENTRYPOINT ["/usr/bin/dumb-init", "--", "/app/entrypoint/entrypoint.sh"]