-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
64 lines (55 loc) · 2.04 KB
/
docker-compose.yml
File metadata and controls
64 lines (55 loc) · 2.04 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
services:
modlog-bot:
build: .
image: ghcr.io/baker-scripts/redditmodlog:latest
container_name: reddit-modlog-bot
restart: unless-stopped
environment:
# User/Group IDs for file permissions
- PUID=${PUID:-1000}
- PGID=${PGID:-1000}
# Reddit API credentials - REQUIRED
- REDDIT_CLIENT_ID=${REDDIT_CLIENT_ID}
- REDDIT_CLIENT_SECRET=${REDDIT_CLIENT_SECRET}
- REDDIT_USERNAME=${REDDIT_USERNAME}
- REDDIT_PASSWORD=${REDDIT_PASSWORD}
# Application settings
- SOURCE_SUBREDDIT=${SOURCE_SUBREDDIT}
- WIKI_PAGE=${WIKI_PAGE:-modlog}
- RETENTION_DAYS=${RETENTION_DAYS:-30}
- BATCH_SIZE=${BATCH_SIZE:-100}
- UPDATE_INTERVAL=${UPDATE_INTERVAL:-300}
- ANONYMIZE_MODERATORS=${ANONYMIZE_MODERATORS:-true}
# Advanced settings (optional)
- WIKI_ACTIONS=${WIKI_ACTIONS:-removelink,removecomment,addremovalreason,spamlink,spamcomment,approvelink,approvecomment}
- IGNORED_MODERATORS=${IGNORED_MODERATORS:-}
# Note: MAX_WIKI_ENTRIES_PER_PAGE and MAX_CONTINUOUS_ERRORS require config.json mount
# These settings are not supported via environment variables
volumes:
# Persistent data storage
- ./data:/config/data
- ./logs:/config/logs
# Optional: Mount config file instead of using env vars
# - ./config.json:/app/config.json:ro
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "5"
# Resource limits (Compose v2 syntax)
mem_limit: 256m
mem_reservation: 128m
cpus: 0.5
# Optional: Multiple bot instances for different subreddits
# modlog-bot-2:
# extends: modlog-bot
# container_name: reddit-modlog-bot-2
# environment:
# - REDDIT_CLIENT_ID=${REDDIT_CLIENT_ID_2}
# - REDDIT_CLIENT_SECRET=${REDDIT_CLIENT_SECRET_2}
# - REDDIT_USERNAME=${REDDIT_USERNAME_2}
# - REDDIT_PASSWORD=${REDDIT_PASSWORD_2}
# - SOURCE_SUBREDDIT=${SOURCE_SUBREDDIT_2}
# volumes:
# - ./data2:/config/data
# - ./logs2:/config/logs