-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
54 lines (43 loc) · 1.52 KB
/
docker-compose.yml
File metadata and controls
54 lines (43 loc) · 1.52 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
version: "3.8"
services:
mail-watcher:
image: python:3.12-slim
container_name: mail_watcher
working_dir: /app
# Bind mounts for code/config/state
volumes:
- ./watcher.py:/app/watcher.py
- ./requirements.txt:/app/requirements.txt
- ./carriers.json:${CARRIERS_FILE} # e.g., /app/carriers.json
- ./state:/app/state # persists processed_uids.json + events.jsonl
# Environment pulled from .env
environment:
# General app/env behavior
PYTHONUNBUFFERED: ${PYTHONUNBUFFERED}
TZ: ${TZ}
# IMAP / Proton Bridge
IMAP_SERVER: ${IMAP_SERVER}
IMAP_PORT: ${IMAP_PORT}
USE_SSL: ${USE_SSL}
USE_STARTTLS: ${USE_STARTTLS}
# Credentials (local Bridge username/password)
EMAIL_ACCOUNT: ${EMAIL_ACCOUNT}
EMAIL_PASSWORD: ${EMAIL_PASSWORD}
# Mailboxes to scan (comma-separated)
MAILBOXES: ${MAILBOXES}
# Polling & timeouts
CHECK_INTERVAL: ${CHECK_INTERVAL}
CONNECT_TIMEOUT: ${CONNECT_TIMEOUT}
# File paths (inside container)
CARRIERS_FILE: ${CARRIERS_FILE}
STATE_FILE: ${STATE_FILE}
OUTPUT_JSONL: ${OUTPUT_JSONL}
# Optional scoring keywords
KEYWORDS: ${KEYWORDS}
# Mail Options
MARK_SEEN: ${MARK_SEEN}
PROCESS_READ: ${PROCESS_READ}
# Install deps and run the watcher (unbuffered)
command: >
sh -c "pip install -r /app/requirements.txt &&
python -u /app/watcher.py"