iptv-app/web/docker-compose.yml
李岩岩 52fc8099ae feat(web): 创建 Docker Web 服务端
- 添加 Express 服务端,提供频道 API
- 添加 M3U8/TS 流代理,解决跨域问题
- 添加 Dockerfile 和 docker-compose.yml
- 添加 Nginx 反向代理配置
- 支持多阶段构建,自动打包前端
2026-02-05 12:41:50 +08:00

37 lines
813 B
YAML

version: '3.8'
services:
iptv-web:
build: .
container_name: iptv-web
ports:
- "3000:3000"
environment:
- PORT=3000
- NODE_ENV=production
volumes:
# 挂载频道数据(可选,用于更新)
- ../ui/dist-web/api:/app/public/api:ro
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:3000/health"]
interval: 30s
timeout: 10s
retries: 3
# 可选:使用 Nginx 作为反向代理
nginx:
image: nginx:alpine
container_name: iptv-nginx
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx/ssl:/etc/nginx/ssl:ro
depends_on:
- iptv-web
restart: unless-stopped
profiles:
- nginx