-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.production
44 lines (29 loc) · 1005 Bytes
/
Dockerfile.production
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
43
44
FROM ruby:3.1.2
ENV PROJECT_ROOT /app
WORKDIR ${PROJECT_ROOT}
ENV NODE_VERSION 18.x
RUN curl -sL https://deb.nodesource.com/setup_${NODE_VERSION} | bash -
RUN apt-get install -y nodejs
RUN npm install -g yarn
RUN apt-get update && apt-get install -y \
build-essential \
git \
libpq-dev \
libsqlite3-dev \
&& rm -rf /var/lib/apt/lists/*
COPY package.json .
COPY yarn.lock .
RUN yarn install
COPY Gemfile .
COPY Gemfile.lock .
RUN bundle install --jobs $(nproc)
COPY . .
# RUN APP_HOST=example.test bin/rails js:routes:typescript
RUN yarn install
RUN APP_HOST=example.test NODE_ENV=production RAILS_ENV=production SECRET_KEY_BASE=jopa NODE_OPTIONS='--openssl-legacy-provider' bin/rails assets:precompile
ENV DOCKER_CHANNEL stable
ENV DOCKER_VERSION 20.10.21
ENV DISABLE_SPRING 1
# RUN curl -fsSL "https://download.docker.com/linux/static/${DOCKER_CHANNEL}/x86_64/docker-${DOCKER_VERSION}.tgz" \
# | tar -xzC /usr/local/bin --strip=1 docker/docker
CMD ["make", "start-production"]