-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/qier222/YesPlayMusic
- Loading branch information
Showing
4 changed files
with
37 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,25 @@ | ||
FROM node:16.13.1-alpine as build | ||
ENV VUE_APP_NETEASE_API_URL=/api | ||
WORKDIR /app | ||
RUN apk add --no-cache python3 make g++ git | ||
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories &&\ | ||
apk add --no-cache python3 make g++ git | ||
COPY package.json yarn.lock ./ | ||
RUN yarn install | ||
COPY . . | ||
RUN yarn build | ||
RUN yarn config set electron_mirror https://npmmirror.com/mirrors/electron/ && \ | ||
yarn build | ||
|
||
FROM nginx:1.20.2-alpine as app | ||
|
||
COPY --from=build /app/package.json /usr/local/lib/ | ||
|
||
RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.14/main libuv \ | ||
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories &&\ | ||
apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.14/main libuv \ | ||
&& apk add --no-cache --update-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.14/main nodejs npm \ | ||
&& npm i -g $(awk -F \" '{if($2=="NeteaseCloudMusicApi") print $2"@"$4}' /usr/local/lib/package.json) \ | ||
&& rm -f /usr/local/lib/package.json | ||
|
||
COPY --from=build /app/docker/nginx.conf.example /etc/nginx/conf.d/default.conf | ||
COPY --from=build /app/dist /usr/share/nginx/html | ||
|
||
CMD nginx ; exec npx NeteaseCloudMusicApi | ||
CMD nginx ; exec npx NeteaseCloudMusicApi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters