-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
executable file
·48 lines (38 loc) · 1.18 KB
/
Dockerfile
File metadata and controls
executable file
·48 lines (38 loc) · 1.18 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
# syntax=docker/dockerfile:1
FROM node:20-bookworm AS base
WORKDIR /usr/src/app
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
ca-certificates \
tzdata \
intel-media-va-driver \
libva-drm2 \
vainfo \
xz-utils \
unzip; \
\
rm -rf /var/lib/apt/lists/*
COPY package*.json ./
RUN set -eux; \
export NPM_CONFIG_LOGLEVEL=warn; \
export NPM_CONFIG_IGNORE_SCRIPTS=true; \
if [ -f package-lock.json ]; then \
npm ci --omit=dev; \
else \
npm install --omit=dev; \
fi; \
npm cache clean --force
COPY . .
ENV NODE_ENV=production \
PORT=5174 \
GHARMONIZE_WEB_BINARIES=1 \
GHARMONIZE_WEB_BINARIES_IN_DOCKER=1 \
GHARMONIZE_WEB_CACHE_DIR=/usr/src/app/cache/binaries \
DISABLE_QSV_IN_DOCKER=1 \
DISABLE_VAAPI_IN_DOCKER=1
RUN mkdir -p uploads outputs temp local-inputs cookies && chmod -R 0775 /usr/src/app
EXPOSE 5174
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
CMD ["node", "-e", "fetch('http://127.0.0.1:' + (process.env.PORT || 5174) + '/').then((res) => process.exit(res.ok ? 0 : 1)).catch(() => process.exit(1))"]
CMD ["node", "app.js"]