forked from qier222/YesPlayMusic
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(ncmapi): use upstream version (qier222#1278)
* refactor(ncmapi): use upstream version FIXME: After qier222#1457 released, switch to the NPM version. * fix(docker): install NeteaseCloudMusicApi early * fix: remove useless submodule entry * fix(ncmapi): update to 4.5.2
- Loading branch information
Showing
8 changed files
with
26 additions
and
41 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,5 +1,3 @@ | ||
build | ||
coverage | ||
dist | ||
netease_api | ||
|
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,46 +1,43 @@ | ||
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++ | ||
RUN apk add --no-cache python3 make g++ git | ||
COPY package.json yarn.lock ./ | ||
RUN yarn install | ||
COPY . . | ||
RUN yarn build | ||
|
||
FROM nginx:1.20.2-alpine as app | ||
RUN 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 yarn | ||
|
||
COPY --from=build /app/dist /usr/share/nginx/html | ||
COPY --from=build /app/netease_api /usr/src/netease_api | ||
WORKDIR /usr/src/netease_api | ||
|
||
RUN yarn install | ||
|
||
RUN echo $'server { \n\ | ||
gzip on;\n\ | ||
listen 80; \n\ | ||
listen [::]:80; \n\ | ||
server_name localhost; \n\ | ||
\n\ | ||
location / { \n\ | ||
root /usr/share/nginx/html; \n\ | ||
index index.html; \n\ | ||
try_files $uri $uri/ /index.html; \n\ | ||
root /usr/share/nginx/html; \n\ | ||
index index.html; \n\ | ||
try_files $uri $uri/ /index.html; \n\ | ||
} \n\ | ||
\n\ | ||
location @rewrites { \n\ | ||
rewrite ^(.*)$ /index.html last; \n\ | ||
rewrite ^(.*)$ /index.html last; \n\ | ||
} \n\ | ||
\n\ | ||
location /api/ { \n\ | ||
proxy_set_header Host $host; \n\ | ||
proxy_set_header X-Real-IP $remote_addr; \n\ | ||
proxy_set_header X-Forwarded-For $remote_addr; \n\ | ||
proxy_set_header X-Forwarded-Host $remote_addr; \n\ | ||
proxy_set_header X-NginX-Proxy true; \n\ | ||
proxy_pass http://localhost:3000/; \n\ | ||
proxy_set_header Host $host; \n\ | ||
proxy_set_header X-Real-IP $remote_addr; \n\ | ||
proxy_set_header X-Forwarded-For $remote_addr; \n\ | ||
proxy_set_header X-Forwarded-Host $remote_addr; \n\ | ||
proxy_set_header X-NginX-Proxy true; \n\ | ||
proxy_pass http://localhost:3000/; \n\ | ||
} \n\ | ||
}' > /etc/nginx/conf.d/default.conf | ||
}' > /etc/nginx/conf.d/default.conf | ||
|
||
RUN 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 NeteaseCloudMusicApi | ||
|
||
COPY --from=build /app/dist /usr/share/nginx/html | ||
|
||
CMD nginx ; exec node app.js | ||
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
Submodule netease_api
deleted from
69a71c
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