forked from cinepro-org/core
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
62 lines (44 loc) · 1.52 KB
/
Copy pathDockerfile
File metadata and controls
62 lines (44 loc) · 1.52 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
59
60
61
62
# Build stage
FROM node:22-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
# Production stage
FROM node:22-alpine
WORKDIR /app
RUN apk add --no-cache chromium
ARG VERSION
ARG REVISION
ARG CREATED
ARG DESCRIPTION
ARG SOURCE
LABEL org.opencontainers.image.title="CinePro Core" \
org.opencontainers.image.description="${DESCRIPTION}" \
org.opencontainers.image.version="${VERSION}" \
org.opencontainers.image.revision="${REVISION}" \
org.opencontainers.image.created="${CREATED}" \
org.opencontainers.image.source="${SOURCE}"
LABEL org.opencontainers.image.description="CinePro Core is the central scraping and streaming engine of the CinePro ecosystem. It exposes an OMSS-compliant HTTP API for resolving movie and TV show streams from multiple providers."
ARG NODE_ENV=production
ARG PORT=3000
ARG CACHE_TYPE=memory
ENV NODE_ENV=${NODE_ENV}
ENV HOST=0.0.0.0
ENV PORT=${PORT}
ENV CACHE_TYPE=${CACHE_TYPE}
ENV DADDYLIVE_BROWSER_EXECUTABLE_PATH=/usr/bin/chromium-browser
COPY package*.json ./
RUN npm ci --only=production
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/config ./config
# Release managers may stage the Git worktree with a restrictive umask. Keep
# the runtime image non-root while making static configuration traversable and
# readable regardless of the source checkout's host-side modes.
RUN chmod -R a+rX ./config
RUN addgroup -g 1001 -S nodejs && \
adduser -S nodejs -u 1001
USER nodejs
EXPOSE ${PORT}
CMD ["node", "dist/server.js"]