-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
43 lines (32 loc) Β· 978 Bytes
/
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
39
40
41
42
FROM docker.io/ruby:3.3-slim-bookworm
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
libc-dev \
sqlite3 \
nodejs \
npm \
libyaml-dev && \
adduser --disabled-password --uid 1001 --home /app app && \
mkdir -p /app && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY Gemfile Gemfile.lock ckeditor5.gemspec ./
COPY lib/ lib/
COPY sandbox/ sandbox/
RUN chown -R app:app /app
USER app
RUN gem install bundler && \
bundle config set without 'development test' && \
bundle install
ARG RAILS_MASTER_KEY
ENV RAILS_MASTER_KEY=${RAILS_MASTER_KEY}
ENV RAILS_ENV=production
ENV PORT=3002
ENV WEB_CONCURRENCY=3
ENV RAILS_MAX_THREADS=5
RUN cd sandbox/ && bundle exec rake assets:precompile
# Add these lines to create required directories
RUN mkdir -p sandbox/tmp/pids sandbox/log
RUN chown -R app:app sandbox/tmp sandbox/log
CMD ["sh", "-c", "cd sandbox/ && bundle exec puma -C config/puma.rb"]