forked from chuot/rdio-scanner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
30 lines (28 loc) · 1 KB
/
Dockerfile
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
FROM --platform=${BUILDPLATFORM:-amd64} node:lts-alpine as client-build
WORKDIR /app/client
COPY client/. .
RUN NG_CLI_ANALYTICS=0 npm ci --loglevel=error --no-progress && \
npm run build
FROM node:lts-alpine as server-build
WORKDIR /app/server
COPY server/. .
RUN apk add --no-cache --no-progress --quiet python make gcc g++ linux-headers && \
npm config set jobs max && \
npm ci --loglevel=error --no-progress && \
npm run build && \
npm prune --production
FROM node:lts-alpine
LABEL maintainer="Chrystian Huot <[email protected]>"
WORKDIR /app
ENV APP_DATA=/app/data \
APP_PORT=3000 \
DOCKER=1
RUN apk --no-cache --no-progress add ffmpeg openssl sqlite tzdata && \
mkdir -p "${APP_DATA}"
COPY LICENSE .
COPY --from=client-build /app/client/dist/rdio-scanner/. client/.
COPY --from=server-build /app/server/node_modules/. server/node_modules/.
COPY --from=server-build /app/server/dist/index.js server/.
VOLUME [ "/app/data" ]
EXPOSE ${APP_PORT}
ENTRYPOINT [ "node", "server" ]