-
Notifications
You must be signed in to change notification settings - Fork 599
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
233 additions
and
68 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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
node_modules | ||
npm-debug.log | ||
Dockerfile* | ||
docker-compose* | ||
.dockerignore | ||
.git | ||
.github | ||
.gitignore | ||
README.md | ||
LICENSE | ||
.vscode | ||
dist |
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,2 +1,5 @@ | ||
ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ | ||
registry=https://registry.npmmirror.com | ||
disturl=https://registry.npmmirror.com/-/binary/node | ||
# ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ | ||
ELECTRON_MIRROR=https://registry.npmmirror.com/-/binary/electron/ | ||
shamefully-hoist=true |
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# build | ||
FROM node:18-alpine as builder | ||
|
||
RUN apk update && apk add --no-cache git | ||
|
||
WORKDIR /app | ||
|
||
COPY package*.json ./ | ||
|
||
RUN npm install | ||
|
||
COPY . . | ||
|
||
RUN [ ! -e ".env" ] && cp .env.example .env || true | ||
|
||
RUN npm run build | ||
|
||
# nginx | ||
FROM nginx:1.20.2-alpine as app | ||
|
||
COPY --from=builder /app/out/renderer /usr/share/nginx/html | ||
|
||
COPY --from=builder /app/nginx.conf /etc/nginx/conf.d/default.conf | ||
|
||
RUN apk add --no-cache npm | ||
|
||
RUN npm install -g NeteaseCloudMusicApi | ||
|
||
CMD nginx && 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
services: | ||
SPlayer: | ||
build: | ||
context: . | ||
image: splayer | ||
container_name: SPlayer | ||
volumes: | ||
- /etc/localtime:/etc/localtime:ro | ||
- /etc/timezone:/etc/timezone:ro | ||
ports: | ||
- 7899:7899 | ||
restart: always |
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
server { | ||
gzip on; | ||
listen 7899; | ||
listen [::]:7899; | ||
server_name localhost; | ||
|
||
location / { | ||
root /usr/share/nginx/html; | ||
index index.html; | ||
try_files $uri $uri/ /index.html; | ||
} | ||
|
||
location @rewrites { | ||
rewrite ^(.*)$ /index.html last; | ||
} | ||
|
||
location /api/ { | ||
proxy_buffers 16 32k; | ||
proxy_buffer_size 128k; | ||
proxy_busy_buffers_size 128k; | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $remote_addr; | ||
proxy_set_header X-Forwarded-Host $remote_addr; | ||
proxy_set_header X-NginX-Proxy true; | ||
proxy_pass http://localhost:3000/; | ||
} | ||
} |
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