-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.env
More file actions
163 lines (119 loc) · 4.93 KB
/
example.env
File metadata and controls
163 lines (119 loc) · 4.93 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
# Threadmirror Backend Environment Configuration
# Copy this file to .env and modify the values as needed
# ===========================================
# Common Configuration
# ===========================================
# Thread URL template, e.g. https://threadmirror.xyz/thread/%s
THREAD_URL_TEMPLATE=https://threadmirror.xyz/thread/%s
# ===========================================
# Server Configuration
# ===========================================
# Server host address (default: localhost:8080)
SERVER_ADDR=localhost:8080
# Server read timeout in seconds (default: 30s)
SERVER_READ_TIMEOUT=30s
# Server write timeout in seconds (default: 30s)
SERVER_WRITE_TIMEOUT=30s
# ===========================================
# Database Configuration
# ===========================================
# Database driver (postgres, sqlite) (default: sqlite)
DB_DRIVER=sqlite
# Database connection string (default: file::memory:?cache=shared)
# For SQLite (development)
DB_DSN=file::memory:?cache=shared
# For PostgreSQL (production)
# DB_DSN=host=localhost user=username password=password dbname=threadmirror port=5432 sslmode=prefer TimeZone=UTC
# ===========================================
# Redis Configuration (for Asynq job queue)
# ===========================================
# Redis server address (default: localhost:6379)
REDIS_ADDR=localhost:6379
# Redis password (default: empty)
REDIS_PASSWORD=
# Redis database number (default: 0)
REDIS_DB=0
# ===========================================
# Application Configuration
# ===========================================
# Debug mode (true/false)
TM_DEBUG=false
# Log level (debug, info, warn, error)
TM_LOG_LEVEL=info
# ===========================================
# Twitter Bot Configuration
# ===========================================
BOT_ENABLE=true
# -------------------------------------------
# Multi-account Twitter bot credentials (JSON)
# -------------------------------------------
# Provide an array of objects. Each object corresponds to one bot account
# with fields matching the config.BotCredential struct (case-sensitive).
# Example:
# BOT_CREDENTIALS=[{"username":"bot1","password":"p1","email":"bot1@example.com","api_key":"key1","api_key_secret":"secret1","access_token":"token1","access_token_secret":"tokensecret1"}]
BOT_CREDENTIALS=
# If you only need a single account, you can still use the individual
# BOT_* variables below (ignored when BOT_CREDENTIALS is set):
# Twitter bot credentials
# BOT_USERNAME=your_bot_username
# BOT_PASSWORD=your_bot_password
# BOT_EMAIL=your_bot_email@example.com
# Twitter API credentials
# BOT_API_KEY=your_twitter_api_key
# BOT_API_KEY_SECRET=your_twitter_api_key_secret
# BOT_ACCESS_TOKEN=your_twitter_access_token
# BOT_ACCESS_TOKEN_SECRET=your_twitter_access_token_secret
# Bot behavior settings
BOT_CHECK_INTERVAL=5m
# Prefix of author screen names to exclude from mention processing (default: threadmirror)
BOT_EXCLUDE_MENTION_AUTHOR_PREFIX=threadmirror
# Username to monitor for mentions (if empty, uses first credential's username)
# BOT_MENTION_USERNAME=your_mention_username
# Enable image replies when responding to mentions (true/false, default: true)
BOT_ENABLE_IMAGE_REPLY=true
# ===========================================
# Cron Configuration
# ===========================================
# Thread status cleanup configuration
THREAD_CLEANUP_INTERVAL_MINUTES=15
THREAD_SCRAPING_TIMEOUT_MINUTES=30
THREAD_PENDING_TIMEOUT_MINUTES=60
THREAD_RETRY_DELAY_MINUTES=15
THREAD_MAX_RETRIES=5
# ===========================================
# Auth0 Configuration
# ===========================================
AUTH0_DOMAIN=
AUTH0_AUDIENCE=
# ===========================================
# LLM Configuration
# ===========================================
OPENAI_BASE_URL=
OPENAI_API_KEY=
OPENAI_MODEL=
# ===========================================
# IPFS Configuration
# ===========================================
# IPFS backend type (kubo, pdp) (default: kubo)
IPFS_BACKEND=kubo
# ===========================================
# Kubo IPFS Backend Configuration
# ===========================================
# Kubo IPFS node URL/multiaddr (default: /ip4/127.0.0.1/tcp/5001)
IPFS_KUBO_NODE_URL=/ip4/127.0.0.1/tcp/5001
# For remote Kubo nodes (e.g., Pinata)
# IPFS_KUBO_NODE_URL=/dns4/turquoise-ordinary-boar-598.mypinata.cloud/tcp/443/https
# ===========================================
# PDP IPFS Backend Configuration
# ===========================================
# PDP service URL
# IPFS_PDP_SERVICE_URL=https://pdp.example.com
# PDP service name
# IPFS_PDP_SERVICE_NAME=threadmirror-service
# PDP private key (PEM format)
# You can either set the key directly or use a file path
# IPFS_PDP_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\nMIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQg...\n-----END PRIVATE KEY-----\n"
# PDP proof set ID (uint64)
# IPFS_PDP_PROOF_SET_ID=0
# CORS allowed frontend domains, separated by commas
CORS_ALLOWED_ORIGINS=https://your-frontend.com,https://admin.your-frontend.com