-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathdocker-compose.build.yml
More file actions
37 lines (35 loc) · 1.06 KB
/
docker-compose.build.yml
File metadata and controls
37 lines (35 loc) · 1.06 KB
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
32
33
34
35
36
37
version: '3.8'
services:
ccload:
build:
context: .
dockerfile: Dockerfile
args:
# 版本号:用于静态资源缓存控制
# - dev(默认):开发环境,静态资源不缓存
# - v1.x.x:生产环境,静态资源长缓存
# 生产构建: VERSION=$(git describe --tags --always) docker-compose -f docker-compose.build.yml build
VERSION: ${VERSION:-dev}
image: ccload:local
container_name: ccload
restart: unless-stopped
ports:
- "8080:8080"
environment:
- PORT=8080
- SQLITE_PATH=/app/data/ccload.db
- GIN_MODE=release
# 必填:未设置将无法启动
- CCLOAD_PASS=your_admin_password
# API访问令牌通过Web界面管理: http://localhost:8080/web/tokens.html
volumes:
- ccload_data:/app/data
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
volumes:
ccload_data:
driver: local