-
Notifications
You must be signed in to change notification settings - Fork 175
Expand file tree
/
Copy pathDockerfile
More file actions
54 lines (45 loc) · 1.43 KB
/
Copy pathDockerfile
File metadata and controls
54 lines (45 loc) · 1.43 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
FROM alpine AS base
FROM base AS builder
WORKDIR /source-code
COPY . .
RUN apk add --update \
g++ \
make \
py3-pip \
nodejs \
npm \
&& (apk add --no-cache chromaprint || true) \
&& npm install --ignore-scripts --no-audit --no-fund && npm run build \
&& rm -rf node_modules && npm install --omit=dev --no-audit --no-fund \
&& mkdir -p build-output \
&& mv server node_modules config.js index.js package.json public -t build-output
FROM base AS final
WORKDIR /server
RUN apk add --update --no-cache nodejs \
&& (apk add --no-cache chromaprint || echo "chromaprint apk not found, will use bundled binary")
COPY --from=builder ./source-code/build-output ./
VOLUME /server/data
ENV DATA_PATH='/server/data'
ENV LOG_PATH='/server/data/logs'
EXPOSE 9527
ENV NODE_ENV='production'
ENV PORT=9527
ENV BIND_IP='0.0.0.0'
# ENV PROXY_HEADER 'x-real-ip'
# ENV SERVER_NAME 'My Sync Server'
# ENV MAX_SNAPSHOT_NUM '10'
# ENV LIST_ADD_MUSIC_LOCATION_TYPE 'top'
# ENV LX_USER_user1 '123.123'
# ENV LX_USER_user2 '{ "password": "123.456", "maxSnapshotNum": 10, "list.addMusicLocationType": "top" }'
# ENV CONFIG_PATH '/server/config.js'
# ENV WEBDAV_URL ''
# ENV WEBDAV_USERNAME ''
# ENV WEBDAV_PASSWORD ''
# ENV SYNC_INTERVAL '60'
# ENV ENABLE_WEBPLAYER_AUTH 'false'
# ENV WEBPLAYER_PASSWORD '123456'
# ENV LOG_PATH '/server/logs'
# ENV DATA_PATH '/server/data'
# ENV PLAYER_ENABLE_AUTH 'true'
# ENV PLAYER_PASSWORD '123.456'
CMD [ "node", "index.js" ]