-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.lite
More file actions
20 lines (15 loc) · 1022 Bytes
/
Dockerfile.lite
File metadata and controls
20 lines (15 loc) · 1022 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
FROM ruby:3.4
LABEL MAINTAINER Richard Adams richard@madwire.co.uk
ENV PORT=80
ENV MIN_INSTANCES=2
ENV MAX_POOL_SIZE=6
ENV RUBY_YJIT_ENABLE=1
RUN curl -sL https://deb.nodesource.com/setup_22.x | bash - && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | tee /usr/share/keyrings/yarn.gpg >/dev/null && echo "deb [signed-by=/usr/share/keyrings/yarn.gpg] https://dl.yarnpkg.com/debian/ stable main" > /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'