-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.lite
24 lines (18 loc) · 1.08 KB
/
Dockerfile.lite
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM ruby:3.3
LABEL MAINTAINER Richard Adams [email protected]
ENV PORT=80
ENV MIN_INSTANCES=2
ENV MAX_POOL_SIZE=6
ENV RUBY_YJIT_ENABLE=1
# Specify the RubyGems version to fix an issue with passenger not loading after v3.5.11
# https://github.com/phusion/passenger/issues/2567
RUN gem update --system 3.5.11
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash - && 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
RUN apt-get update -qq && apt-get install -y build-essential nodejs yarn libsodium23 libjemalloc2 && rm -rf /var/lib/apt/lists/*
# Enable Jemalloc
RUN ln -s /usr/lib/*-linux-gnu/libjemalloc.so.2 /usr/lib/libjemalloc.so.2
ENV LD_PRELOAD=/usr/lib/libjemalloc.so.2
RUN gem install passenger && passenger-config install-standalone-runtime && passenger-config build-native-support
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
CMD sh -c 'passenger start -p $PORT --max-pool-size $MAX_POOL_SIZE --min-instances $MIN_INSTANCES --disable-log-prefix --log-file /dev/stdout'