parent
14566b20b2
commit
66f9b4f526
@ -0,0 +1,16 @@
|
|||||||
|
node_modules
|
||||||
|
npm-debug.log
|
||||||
|
Dockerfile*
|
||||||
|
docker-compose*
|
||||||
|
.dockerignore
|
||||||
|
.git
|
||||||
|
.github
|
||||||
|
.gitignore
|
||||||
|
README.md
|
||||||
|
LICENSE
|
||||||
|
.vscode
|
||||||
|
dist
|
||||||
|
dist_electron
|
||||||
|
build
|
||||||
|
images
|
||||||
|
script
|
@ -0,0 +1,42 @@
|
|||||||
|
FROM node:lts-alpine as build
|
||||||
|
ENV VUE_APP_NETEASE_API_URL=/api
|
||||||
|
WORKDIR /app
|
||||||
|
COPY . .
|
||||||
|
RUN yarn && yarn build
|
||||||
|
|
||||||
|
FROM nginx:alpine as app
|
||||||
|
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 apk add --no-cache --repository http://nl.alpinelinux.org/alpine/edge/main libuv \
|
||||||
|
&& apk add --no-cache --update-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/main nodejs=16.13.1-r1 npm=8.3.0-r0 \
|
||||||
|
&& npm 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\
|
||||||
|
} \n\
|
||||||
|
\n\
|
||||||
|
location @rewrites { \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\
|
||||||
|
} \n\
|
||||||
|
}' > /etc/nginx/conf.d/default.conf
|
||||||
|
|
||||||
|
CMD nginx ; exec node app.js
|
@ -0,0 +1,9 @@
|
|||||||
|
services:
|
||||||
|
YesPlayMusic:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
image: yesplaymusic
|
||||||
|
container_name: YesPlayMusic
|
||||||
|
ports:
|
||||||
|
- 80:80
|
||||||
|
restart: always
|
Loading…
Reference in new issue