-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (28 loc) · 854 Bytes
/
Dockerfile
File metadata and controls
38 lines (28 loc) · 854 Bytes
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.2.1-bullseye
RUN apt-get update -qq && apt-get install -y nodejs npm postgresql-client python3 python3-pip ffmpeg
RUN npm install -g yarn
RUN mkdir /app
WORKDIR /app
COPY Gemfile /app/Gemfile
COPY Gemfile.lock /app/Gemfile.lock
RUN bundle config set clean true && \
bundle config set deployment true && \
bundle config set no-cache true && \
bundle config set without 'development test' && \
bundle install
COPY package.json /app/package.json
COPY yarn.lock /app/yarn.lock
RUN yarn install --production
COPY . /app
RUN chmod +x /app/docker/entrypoint.sh
ENTRYPOINT ["/app/docker/entrypoint.sh"]
EXPOSE 3000
ENV PATH="/app/bin:${PATH}"
ENV RAILS_ENV=production
ENV NODE_ENV=production
# Precompile assets
RUN webpack
ENV RAILS_SERVE_STATIC_FILES="yes"
ENV RAILS_LOG_TO_STDOUT="yes"
ENV PORT=3000
CMD ["start-server"]