-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
32 lines (31 loc) · 884 Bytes
/
docker-compose.yml
File metadata and controls
32 lines (31 loc) · 884 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
32
services:
simplephotos:
image: lzyyauto/simplephotos:latest
ports:
- "8000:8000"
volumes:
- /Users/zingliu/Code/SimplePhotos/data:/app/data
- /Volumes/Pic:/app/data/images
environment:
- NODE_ENV=production
- LANG=zh_CN.UTF-8
- LC_ALL=zh_CN.UTF-8
- DATA_ROOT=/app/data
- IMAGES_DIR=/app/data/images
- SCAN_WORKERS=4 # 扫描线程数,建议设置为 CPU 核心数的 2-4 倍
- SCAN_CHUNK_SIZE=20 # 每个分片的文件数
# 数据库配置:使用 postgresql(或注释掉改用默认 sqlite)
- DB_TYPE=postgresql
- PG_HOST=localhost
- PG_PORT=5432
- PG_USER=postgres
- PG_PASSWORD=
- PG_DATABASE=simplephotos
deploy:
resources:
limits:
memory: 4G
cpus: '4'
volumes:
data:
driver: local