forked from Ouonnki/OuonnkiTV
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
31 lines (29 loc) · 978 Bytes
/
docker-compose.yml
File metadata and controls
31 lines (29 loc) · 978 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
version: '3.8'
services:
ouonnkitv:
build:
context: .
dockerfile: Dockerfile
args:
BUILD_DATE: ${BUILD_DATE:-}
VCS_REF: ${VCS_REF:-}
VERSION: ${VERSION:-dev}
# 构建时传入环境变量
VITE_PROXY_URL: ${VITE_PROXY_URL:-https://api.codetabs.com/v1/proxy?quest=}
VITE_INITIAL_VIDEO_SOURCES: ${VITE_INITIAL_VIDEO_SOURCES:-}
ports:
- "3000:80"
environment:
- NODE_ENV=production
# 运行时环境变量(虽然前端构建时已处理,但保持一致性)
- VITE_PROXY_URL=${VITE_PROXY_URL:-https://api.codetabs.com/v1/proxy?quest=}
- VITE_INITIAL_VIDEO_SOURCES=${VITE_INITIAL_VIDEO_SOURCES:-}
restart: unless-stopped
container_name: ouonnkitv-dev
# 健康检查
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:80"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s