forked from comeonzhj/AutoContents
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
69 lines (66 loc) · 1.59 KB
/
Copy pathdocker-compose.yml
File metadata and controls
69 lines (66 loc) · 1.59 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
services:
# MakeContents 主应用
makecontents:
build:
context: .
dockerfile: Dockerfile
restart: always
ports:
- '3710:3710'
environment:
NODE_ENV: production
PORT: 3710
RSSHUB_URL: 'http://rsshub:1200'
DB_PATH: /app/data/app.db
RENDER_OUTPUT_DIR: /app/uploads/rendered
# 容器内 Chromium 路径(Debian/Ubuntu apt 安装位置)
CHROME_PATH: /usr/bin/chromium
volumes:
- makecontents-data:/app/data
- makecontents-uploads:/app/uploads
# Chromium 在容器内需要更大的共享内存,否则渲染会崩溃
shm_size: '512mb'
depends_on:
rsshub:
condition: service_healthy
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:3710/api/health']
interval: 30s
timeout: 10s
retries: 3
start_period: 15s
# RSSHub
rsshub:
image: diygod/rsshub
restart: always
ports:
- '1200:1200'
environment:
NODE_ENV: production
CACHE_TYPE: redis
REDIS_URL: 'redis://redis:6379/'
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:1200/healthz']
interval: 30s
timeout: 10s
retries: 3
start_period: 15s
depends_on:
redis:
condition: service_healthy
# Redis(RSSHub 缓存)
redis:
image: redis:alpine
restart: always
volumes:
- redis-data:/data
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
interval: 30s
timeout: 10s
retries: 5
start_period: 5s
volumes:
makecontents-data:
makecontents-uploads:
redis-data: