forked from Sofie-Automation/sofie-package-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
59 lines (39 loc) · 1.1 KB
/
Dockerfile
File metadata and controls
59 lines (39 loc) · 1.1 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
FROM node:24-alpine as builder
# Note: Build this from the root directory:
# cd package-manager
# docker build -f apps/worker/app/Dockerfile -t pm-worker .
# docker build -t pm-worker ../../../..
# Environment
WORKDIR /src
# Common
COPY package.json tsconfig.json tsconfig.build.json yarn.lock lerna.json commonPackage.json .yarnrc.yml ./
COPY scripts ./scripts
COPY .yarn ./.yarn
# Shared dependencies
COPY shared ./shared
# App dependencies
RUN mkdir -p apps/worker
COPY apps/worker/packages apps/worker/packages
# App
COPY apps/worker/app apps/worker/app
# Install
RUN corepack enable
RUN yarn install
# Build
RUN yarn build
# Purge dev-dependencies:
RUN yarn workspaces focus -A --production
RUN rm -r scripts
# Create deploy-image:
FROM node:24-alpine
COPY --from=builder /src /src
RUN apk add --no-cache dumb-init ffmpeg
# Run as non-root user
USER 1000
WORKDIR /src/apps/worker/app
# ENV APP_CONTAINER_PORT=8090
# # ENV HTTP_SERVER_API_KEY_READ=
# # ENV HTTP_SERVER_API_KEY_WRITE=
# ENV HTTP_SERVER_BASE_PATH="/data"
# EXPOSE 8090
ENTRYPOINT ["/usr/bin/dumb-init", "--", "./docker-entrypoint.sh"]