Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Media/PlayParse/Bilibili_Config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"danmaku": {
// 控制是否接收弹幕。按 Alt+H 可显示/隐藏弹幕
"enable": true,
"server": "https://subtitle.chen310.repl.co",
"server": "https://api.mulingowo.cn",
// 字体
"font": "微软雅黑",
// 字号
Expand Down
4 changes: 4 additions & 0 deletions danmaku-server/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
__pycache__/
*.pyc
.env
*.egg-info/
28 changes: 28 additions & 0 deletions danmaku-server/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@


FROM python:3.12-alpine AS runtime


RUN addgroup -S appgroup && adduser -S appuser -G appgroup

WORKDIR /app


COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt


COPY main.py .


USER appuser

EXPOSE 8000


CMD ["gunicorn", "main:app", \
"-w", "4", \
"-k", "uvicorn.workers.UvicornWorker", \
"--bind", "0.0.0.0:8000", \
"--access-logfile", "-", \
"--error-logfile", "-"]
30 changes: 30 additions & 0 deletions danmaku-server/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@


services:
danmaku-api:
build: .
container_name: danmaku-api
restart: unless-stopped
ports:
- "3000:8000"
deploy:
resources:
limits:
cpus: "0.50"
memory: 256M
reservations:
cpus: "0.10"
memory: 64M
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:8000/health"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
environment:
- TZ=Asia/Shanghai
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
Loading