forked from AudioBitsStellar/AudioBlock_Backend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
155 lines (135 loc) · 4.93 KB
/
Copy path.env.example
File metadata and controls
155 lines (135 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
# Server Configuration
# Server port the app listens on
PORT=4000
# Node environment: development | production | test
NODE_ENV=development
# ------------------ Database ------------------
# Postgres host
POSTGRES_HOST=
# Postgres port
POSTGRES_PORT=5432
# Postgres username
POSTGRES_USER=
# Postgres password
POSTGRES_PASSWORD=
# Postgres database name
POSTGRES_DATABASE=
# Connection pool tuning
DB_POOL_MAX=20
DB_POOL_MIN=5
DB_CONNECTION_TIMEOUT_MS=30000
DB_IDLE_TIMEOUT_MS=300000
# How often (ms) to log pool metrics
DB_POOL_METRICS_INTERVAL_MS=30000
# ------------------ Redis ------------------
# Hostname for Redis server used for caching and rate-limits
REDIS_HOST=redis
# TCP port for Redis
REDIS_PORT=6379
# Redis auth password (if set)
REDIS_PASSWORD=
# Redis username (for ACL-enabled Redis)
REDIS_USERNAME=
# ------------------ Auth / JWT ------------------
# JWT secret used to sign authentication tokens
JWT_SECRET=
# ------------------ Soroban / Stellar ------------------
# Which Soroban network to use: testnet | mainnet
SOROBAN_NETWORK=testnet
# RPC URL for the chosen Soroban network (fallback when no per-network override below is set)
SOROBAN_RPC_URL=https://soroban-testnet.stellar.org
# Network passphrase for Stellar/Soroban (fallback when no per-network override below is set)
SOROBAN_NETWORK_PASSPHRASE="Test SDF Network ; September 2015"
# Optional per-network RPC URL / passphrase overrides
# SOROBAN_TESTNET_RPC_URL=
# SOROBAN_MAINNET_RPC_URL=
# SOROBAN_TESTNET_NETWORK_PASSPHRASE=
# SOROBAN_MAINNET_NETWORK_PASSPHRASE=
# Contract IDs — required for whichever network SOROBAN_NETWORK selects
SOROBAN_TESTNET_NFT_CONTRACT_ID=
SOROBAN_TESTNET_ARTIST_CONTRACT_ID=
SOROBAN_TESTNET_CATALOG_CONTRACT_ID=
SOROBAN_TESTNET_ROYALTY_CONTRACT_ID=
SOROBAN_TESTNET_MARKETPLACE_CONTRACT_ID=
SOROBAN_MAINNET_NFT_CONTRACT_ID=
SOROBAN_MAINNET_ARTIST_CONTRACT_ID=
SOROBAN_MAINNET_CATALOG_CONTRACT_ID=
SOROBAN_MAINNET_ROYALTY_CONTRACT_ID=
SOROBAN_MAINNET_MARKETPLACE_CONTRACT_ID=
# ------------------ Twitter OAuth ------------------
# Client ID from Twitter Developer Portal (OAuth2 PKCE)
TWITTER_CLIENT_ID=
# Client secret from Twitter Developer Portal
TWITTER_CLIENT_SECRET=
# Callback URL registered with the Twitter app
TWITTER_REDIRECT_URI=http://localhost:4000/api/auth/twitter/callback
# Frontend redirect after successful Twitter link (artist dashboard)
TWITTER_SUCCESS_REDIRECT=
# ------------------ Email ------------------
# Which provider to use for transactional emails (resend, sendgrid, etc.)
EMAIL_PROVIDER=resend
# API key for the configured email provider
EMAIL_API_KEY=
# Default From address for outgoing emails
EMAIL_FROM=noreply@audioblocks.com
# Frontend URL for email verification and password reset links
APP_URL=http://localhost:3000
# ------------------ Rate limiting ------------------
AUTH_RATE_LIMIT_WINDOW_MS=900000 # 15 minutes
AUTH_RATE_LIMIT_MAX=20 # max requests per window
NONCE_RATE_LIMIT_WINDOW_MS=900000 # 15 minutes
NONCE_RATE_LIMIT_MAX=10 # max nonce requests per window
# Chunked upload endpoints (/api/song/upload/chunk, /upload/cover, /upload/finalize)
# are rate-limited per authenticated user to prevent abuse.
UPLOAD_RATE_LIMIT_WINDOW_MS=60000 # 1 minute
UPLOAD_RATE_LIMIT_MAX=10 # max requests per user per window
UPLOAD_RATE_LIMIT_ENABLED=true # set false to bypass upload limits in CI/test environments
# ------------------ Logging ------------------
# Pino log level: debug | info | warn | error (default: info)
# Set to "debug" during local development for verbose output.
LOG_LEVEL=info
# ------------------ Malware scanning ------------------
SCAN_PROVIDER=clamav
CLAMAV_URL=http://clamav:9000/scan
CLAMAV_TIMEOUT_MS=30000
# ------------------ Workers / Jobs ------------------
WORKER_MAX_ATTEMPTS=3
WORKER_BACKOFF_BASE_MS=2000
WORKER_BACKOFF_MAX_MS=30000
JOB_MAX_ATTEMPTS=3
JOB_BACKOFF_BASE_MS=2000
JOB_BACKOFF_MAX_MS=30000
JOB_COMPLETED_TTL_S=3600
JOB_QUEUE_WARN_THRESHOLD=100
JOB_MONITOR_INTERVAL_MS=30000
# ------------------ AWS / Storage ------------------
# AWS access key for S3 uploads
AWS_ACCESS_KEY_ID=
# AWS secret access key for S3
AWS_SECRET_ACCESS_KEY=
# AWS region for S3 buckets
AWS_REGION=us-east-1
# S3 bucket used to store uploaded songs and assets
AWS_BUCKET_NAME=
# ------------------ IPFS / Pinata ------------------
PINATA_JWT=
PINATA_GATEWAY=
# ------------------ Dynamic / Lisk integration ---------------
DYNAMIC_AUTH_TOKEN=
DYNAMIC_ENVIRONMENT_ID=
LISK_SEPOLIA_RPC_URL=
# ------------------ RabbitMQ (optional) ------------------
RABBITMQ_URL=
RABBITMQ_HOST=
RABBITMQ_PORT=
RABBITMQ_USER=
RABBITMQ_PASS=
# ------------------ Signed URL / Manifest ------------------
SIGNED_URL_EXPIRES=300
MANIFEST_CACHE_TTL=300
# ------------------ Uploads / limits ------------------
# Max allowed bytes for a single chunk upload (used by SongRoutes)
CHUNK_UPLOAD_MAX_BYTES=8388608
# ------------------ Misc ------------------
# Comma-separated list of allowed CORS origins for the API
ALLOWED_ORIGINS=