-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.jobrunner
37 lines (30 loc) · 1.06 KB
/
Dockerfile.jobrunner
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
#syntax=docker/dockerfile:1
FROM node:20-bookworm-slim AS base
RUN apt-get update -y && apt-get install -y ca-certificates git openssl
FROM base AS build
WORKDIR /app
COPY ./.yarn/ .yarn/
COPY .yarnrc.yml .yarnrc.yml
COPY desktop desktop/
COPY server server/
COPY jobrunner jobrunner/
COPY utility utility/
COPY package.json package.json
COPY yarn.lock yarn.lock
RUN --mount=type=cache,id=badger-yarn,target=.yarn/cache yarn workspaces focus badger-server badger-jobrunner
# NB: Please keep everything above this line the same in all the Dockerfiles, to properly leverage the Docker cache
ENV NODE_ENV=production
ARG IS_YSTV_BUILD
ENV IS_YSTV_BUILD=$IS_YSTV_BUILD
ARG SENTRY_AUTH_TOKEN
ENV SENTRY_AUTH_TOKEN=$SENTRY_AUTH_TOKEN
ARG GIT_REV
ENV GIT_REV=$GIT_REV
RUN yarn workspace badger-jobrunner run build
FROM base
COPY --from=mwader/static-ffmpeg:7.0 /ffmpeg /usr/local/bin/
COPY --from=mwader/static-ffmpeg:7.0 /ffprobe /usr/local/bin/
COPY --from=build /app/jobrunner/dist /app
WORKDIR /app
ENV NODE_ENV=production
ENTRYPOINT ["node", "--enable-source-maps", "index.cjs"]