+6
.env.constellation.example
+6
.env.constellation.example
+12
-91
.env.example
+12
-91
.env.example
···
1
-
# AT Protocol AppView Environment Configuration
2
-
# Copy this file to .env and fill in your values
3
-
4
-
# ============================================
5
-
# REQUIRED: Database Configuration
6
-
# ============================================
7
-
# PostgreSQL connection string
8
-
# Format: postgresql://username:password@host:port/database
9
-
# IMPORTANT: Replace 'atproto' with your actual database name or create it first:
10
-
# psql -U postgres -c "CREATE DATABASE atproto;"
11
-
DATABASE_URL=postgresql://postgres:password@localhost:5432/atproto
12
-
13
-
# Redis connection string for caching and metrics
14
-
# Format: redis://host:port
15
-
# Default: redis://localhost:6379
16
-
REDIS_URL=redis://localhost:6379
1
+
# AppView Configuration
2
+
# Copy this to .env and customize as needed
17
3
18
-
# ============================================
19
-
# REQUIRED: Security
20
-
# ============================================
21
-
# Secret key for JWT signing and encryption
22
-
# Generate with: openssl rand -base64 32
23
-
SESSION_SECRET=change-this-to-a-random-secret-key
4
+
# Constellation Integration (enhanced stats from microcosm.blue)
5
+
# Set to false to disable and avoid timeout errors
6
+
CONSTELLATION_ENABLED=false
24
7
25
-
# ============================================
26
-
# OPTIONAL: Firehose Configuration
27
-
# ============================================
28
-
# AT Protocol relay URL for firehose connection
29
-
# Default: wss://bsky.network/xrpc/com.atproto.sync.subscribeRepos
30
-
RELAY_URL=wss://bsky.network/xrpc/com.atproto.sync.subscribeRepos
8
+
# Constellation settings (only used if CONSTELLATION_ENABLED=true)
9
+
CONSTELLATION_URL=https://constellation.microcosm.blue
10
+
CONSTELLATION_CACHE_TTL=60
31
11
32
-
# Historical backfill configuration (in days)
33
-
# 0 = disabled (no backfill)
34
-
# >0 = backfill X days of historical data
35
-
# WARNING: Resource-intensive! Each day of backfill can take hours and significant disk space
36
-
# Recommended: Start with 1-7 days for testing
37
-
# Default: 0 (disabled)
38
-
BACKFILL_DAYS=0
12
+
# Osprey Integration (federated labeling)
13
+
OSPREY_ENABLED=false
39
14
40
-
# Data retention configuration (in days)
41
-
# 0 = keep all data forever
42
-
# >0 = automatically prune posts/likes/reposts older than X days (runs daily)
43
-
# Note: User profiles and follows are never pruned (preserves social graph)
44
-
# Recommended: 30-90 days for production to manage disk usage
45
-
# Default: 0 (keep forever)
15
+
# Other settings
16
+
BACKFILL_DAYS=2
46
17
DATA_RETENTION_DAYS=0
47
-
48
-
# ============================================
49
-
# OPTIONAL: AppView Identity
50
-
# ============================================
51
-
# DID (Decentralized Identifier) for this AppView instance
52
-
# Used to sign JWTs when authenticating to external feed generators
53
-
#
54
-
# OPTIONS:
55
-
# 1. Use your domain (recommended if you have one):
56
-
# APPVIEW_DID=did:web:yourappview.com
57
-
# Requirements: You must own the domain and be able to host a DID document
58
-
#
59
-
# 2. Leave blank for development/testing (uses default did:web:appview.local)
60
-
# This works but won't be recognized by external services
61
-
#
62
-
# 3. Create a did:plc identifier (advanced):
63
-
# Register at https://plc.directory and use the generated DID
64
-
# APPVIEW_DID=did:plc:your-generated-id
65
-
#
66
-
# For most users: Leave this blank or use did:web:<your-domain> if you have one
67
-
APPVIEW_DID=
68
-
69
-
# ============================================
70
-
# OPTIONAL: Server Configuration
71
-
# ============================================
72
-
# Port for the application server
73
-
# Default: 5000
74
-
PORT=5000
75
-
76
-
# Node environment
77
-
# Options: development, production
78
-
NODE_ENV=production
79
-
80
-
# Database connection pool size
81
-
# Higher values support more concurrent connections
82
-
# Default: 32 (docker-compose uses 100 for production)
83
-
DB_POOL_SIZE=32
84
-
85
-
# Maximum concurrent event processing operations
86
-
# Balances throughput vs memory usage
87
-
# Default: 80
88
-
MAX_CONCURRENT_OPS=80
89
-
90
-
# ============================================
91
-
# Admin Authorization
92
-
# ============================================
93
-
# Comma-separated list of admin DIDs or handles
94
-
# Only users in this list can access admin panel and moderation features
95
-
# Example: ADMIN_DIDS=did:plc:abc123,alice.bsky.social,bob.example.com
96
-
ADMIN_DIDS=
+2
-3
docker-compose.yml
+2
-3
docker-compose.yml
···
112
112
restart: unless-stopped
113
113
114
114
# Constellation Bridge - Enhanced interaction statistics
115
+
# Only starts if CONSTELLATION_ENABLED=true in .env
115
116
constellation-bridge:
116
117
build: ./microcosm-bridge/constellation-client
117
118
environment:
···
126
127
depends_on:
127
128
redis:
128
129
condition: service_healthy
129
-
profiles:
130
-
- constellation
131
-
- microcosm
132
130
healthcheck:
133
131
test: ["CMD-SHELL", "node -e \"require('http').get('http://localhost:3003/health', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})\""]
134
132
interval: 30s
···
136
134
start_period: 40s
137
135
retries: 3
138
136
restart: unless-stopped
137
+
# Note: Set CONSTELLATION_ENABLED=false in your environment to disable Constellation features
139
138
140
139
volumes:
141
140
postgres_data: