.env file at startup (via pydantic-settings) and can be overridden by shell environment variables or Docker Compose’s environment section.
Service
Comma-separated list of allowed CORS origins. In production, replace with your actual frontend domain(s). Multiple origins are separated by commas with no spaces.
Database
MongoDB connection URI. The Docker Compose stack points this to
mongodb://indicators-mongo/indicators, using the named service and database. Update this for external or Atlas-hosted clusters.Message queue
RabbitMQ AMQP connection URL. Includes credentials in the URL. The default uses the built-in
guest account, which should be replaced with a dedicated user in production.Queue name from which the service consumes incoming data segments. Must match the queue name used by the producing service.
Queue name from which the service consumes resource deletion events. Must match the queue name used by the producing service.
Cache
Redis connection URL. Defaults to the named Docker service. Update for external Redis instances or clusters.
Prefix applied to all data cache keys stored in Redis. Changing this effectively invalidates the existing cache without flushing Redis.
Prefix applied to cache miss counter keys in Redis. Used alongside
MISS_THRESHOLD to decide when to populate the full cache.Time-to-live for cached indicator data, in seconds. Defaults to 1 hour. Reduce this value if data changes frequently.
Time-to-live for cache miss counter keys, in seconds. Counters that expire before reaching
MISS_THRESHOLD are reset, preventing stale miss counts from triggering unnecessary cache population.Number of cache misses recorded before the service triggers a full cache population for the affected resource. Increase this to reduce background population frequency under light traffic.
Time-to-live for cached statistics responses, in seconds. Short by default (15 s) to keep aggregate stats reasonably fresh without hitting MongoDB on every request.
Example .env file
The following is a production-ready example. Replace placeholder values with your actual credentials and hostnames before deploying.
.env