-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
169 lines (154 loc) · 5.39 KB
/
docker-compose.yml
File metadata and controls
169 lines (154 loc) · 5.39 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
services:
# --- Comet (Stremio Addon) ---
comet:
image: g0ldyy/comet:latest
container_name: comet
restart: unless-stopped
environment:
# Database
- DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@comet-postgres:5432/${POSTGRES_DB}
- DATABASE_TYPE=postgresql
# Public URL: used by Stremio to reach this addon.
# - If using Caddy: https://comet.yourdomain.com
# - If using Tailscale Serve: https://your-server.tailnet.ts.net
# - If local only: http://192.168.X.X:8000
- PUBLIC_BASE_URL=${PUBLIC_BASE_URL}
- FASTAPI_HOST=0.0.0.0
- FASTAPI_PORT=8000
- TZ=${TZ}
# --- Server Performance ---
- FASTAPI_WORKERS=${FASTAPI_WORKERS:-2}
- USE_GUNICORN=${USE_GUNICORN:-True}
- GUNICORN_PRELOAD_APP=${GUNICORN_PRELOAD_APP:-True}
- EXECUTOR_MAX_WORKERS=${EXECUTOR_MAX_WORKERS:-2}
# --- HTTP Client ---
- HTTP_CLIENT_LIMIT=${HTTP_CLIENT_LIMIT:-100}
- HTTP_CLIENT_LIMIT_PER_HOST=${HTTP_CLIENT_LIMIT_PER_HOST:-20}
- HTTP_CLIENT_TIMEOUT_TOTAL=${HTTP_CLIENT_TIMEOUT_TOTAL:-30}
# --- Indexer Timeouts ---
- INDEXER_MANAGER_TIMEOUT=${INDEXER_MANAGER_TIMEOUT:-12}
- INDEXER_MANAGER_WAIT_TIMEOUT=${INDEXER_MANAGER_WAIT_TIMEOUT:-15}
# --- Scrapers ---
# Each scraper can be: live, background, both, false
# "both" = used for live requests AND background pre-caching
- SCRAPE_JACKETT=${SCRAPE_JACKETT:-both}
- JACKETT_URL=http://jackett:9117
- JACKETT_API_KEY=${JACKETT_API_KEY}
- SCRAPE_TORRENTIO=${SCRAPE_TORRENTIO:-both}
- SCRAPE_ZILEAN=${SCRAPE_ZILEAN:-both}
# --- Cache TTLs (seconds) ---
- TORRENT_CACHE_TTL=${TORRENT_CACHE_TTL:--1}
- LIVE_TORRENT_CACHE_TTL=${LIVE_TORRENT_CACHE_TTL:-86400}
- DEBRID_CACHE_TTL=${DEBRID_CACHE_TTL:-86400}
- METADATA_CACHE_TTL=${METADATA_CACHE_TTL:-2592000}
# --- Background Scraper ---
# Pre-caches popular content so searches resolve instantly.
- BACKGROUND_SCRAPER_ENABLED=${BACKGROUND_SCRAPER_ENABLED:-True}
- BACKGROUND_SCRAPER_CONCURRENT_WORKERS=${BACKGROUND_SCRAPER_CONCURRENT_WORKERS:-2}
- BACKGROUND_SCRAPER_INTERVAL=${BACKGROUND_SCRAPER_INTERVAL:-3600}
- BACKGROUND_SCRAPER_MAX_MOVIES_PER_RUN=${BACKGROUND_SCRAPER_MAX_MOVIES_PER_RUN:-150}
- BACKGROUND_SCRAPER_MAX_SERIES_PER_RUN=${BACKGROUND_SCRAPER_MAX_SERIES_PER_RUN:-150}
- BACKGROUND_SCRAPER_ENABLE_DEMAND_PRIORITY=${BACKGROUND_SCRAPER_ENABLE_DEMAND_PRIORITY:-True}
# --- NETWORKING CONFIGURATION ---
# OPTION A: Using a Reverse Proxy (Caddy, Nginx, Traefik) - RECOMMENDED
# Keep ports commented out. Traffic flows through the 'proxy_net' network.
# OPTION B: Direct Access (No Proxy)
# Uncomment the ports below to access Comet via http://YOUR-IP:8000
# ports:
# - "8000:8000"
depends_on:
postgres:
condition: service_healthy
jackett:
condition: service_started
networks:
- proxy_net
- internal
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:8000/health"]
interval: 30s
timeout: 10s
retries: 3
# --- PostgreSQL Database ---
postgres:
image: postgres:18-alpine
container_name: comet-postgres
restart: unless-stopped
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
command:
- "postgres"
- "-c"
- "shared_buffers=128MB"
- "-c"
- "effective_cache_size=384MB"
- "-c"
- "maintenance_work_mem=64MB"
- "-c"
- "checkpoint_completion_target=0.9"
- "-c"
- "wal_buffers=8MB"
- "-c"
- "random_page_cost=1.1"
- "-c"
- "effective_io_concurrency=200"
- "-c"
- "work_mem=8MB"
- "-c"
- "max_connections=100"
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- internal
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 10s
timeout: 5s
retries: 5
# --- Jackett (Indexer Manager) ---
jackett:
image: lscr.io/linuxserver/jackett:latest
container_name: jackett
environment:
- PUID=${PUID:-1000}
- PGID=${PGID:-1000}
- TZ=${TZ}
- AUTO_UPDATE=true
volumes:
- jackett_config:/config
# --- NETWORKING CONFIGURATION ---
# OPTION A: Reverse Proxy (Recommended). Access via https://jackett.yourdomain.com
# OPTION B: Direct Access. Uncomment below to access via http://YOUR-IP:9117
# ports:
# - "9117:9117"
restart: unless-stopped
networks:
- proxy_net
- internal
# --- FlareSolverr (Captcha Solver) ---
# Helper service for Jackett to bypass Cloudflare protection on some indexers.
# Needs proxy_net for external internet access to solve challenges.
flaresolverr:
image: ghcr.io/flaresolverr/flaresolverr:latest
container_name: flaresolverr
environment:
- LOG_LEVEL=info
- LOG_HTML=false
- CAPTCHA_SOLVER=none
- TZ=${TZ}
networks:
- proxy_net
- internal
volumes:
postgres_data:
jackett_config:
networks:
internal:
# No internet access. Used for DB <-> service communication only.
internal: true
proxy_net:
# Set to 'true' if you have an existing Caddy/Proxy network.
# Set to 'false' if you want Docker to create it.
external: true