-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.scheduler
38 lines (31 loc) · 1.17 KB
/
Dockerfile.scheduler
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 --platform=linux/amd64 node:19.3.0 AS base
# We don't need the standalone Chromium
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
# install libvips
RUN apt-get update && apt-get install -y libvips
# install chromium for puppeteer
RUN apt-get update && apt-get install gnupg wget -y && \
wget --quiet --output-document=- https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/google-archive.gpg && \
sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' && \
apt-get update && \
apt-get install google-chrome-stable -y --no-install-recommends && \
rm -rf /var/lib/apt/lists/*
FROM base AS copy
WORKDIR /home/node
COPY src/core ./core
WORKDIR /home/node/app
COPY src/server/package.json ./
COPY src/server/yarn.lock ./
COPY src/server/src ./src
RUN yarn install --non-interactive --immutable
FROM copy AS pre-build
COPY src/server/tsconfig.json ./
COPY src/server/tsconfig.build.json ./
FROM pre-build AS build
ENV NODE_ENV=production
COPY src/server/gen-sql-queries.ts ./
RUN yarn sql
RUN yarn cp:core
RUN yarn build:scheduler
FROM build AS scheduler
CMD yarn start:scheduler