This guide covers all configuration options for Tracker.
Tracker is configured primarily through environment variables. Below is a complete reference.
| Variable | Default | Description |
|---|---|---|
DB_HOST |
localhost |
MongoDB hostname or IP address |
DB_PORT |
27017 |
MongoDB port |
DB_NAME |
tracker |
Database name |
DB_USER |
- | MongoDB username (optional) |
DB_PASSWORD |
- | MongoDB password (optional) |
DB_AUTH_SOURCE |
admin |
MongoDB authentication database |
DB_TIMEOUT |
10s |
Connection timeout |
Example:
DB_HOST=mongodb.example.com
DB_PORT=27017
DB_NAME=tracker_prod
DB_USER=tracker_user
DB_PASSWORD=secure_password| Variable | Default | Description |
|---|---|---|
HTTP_PORT |
8080 |
HTTP/REST API and Web UI port |
GRPC_PORT |
8765 |
gRPC API port |
METRICS_PORT |
8081 |
Prometheus metrics port |
LOG_LEVEL |
info |
Logging level: debug, info, warn, error |
LOG_FORMAT |
json |
Log format: json or text |
Example:
HTTP_PORT=9080
GRPC_PORT=9765
METRICS_PORT=9081
LOG_LEVEL=debug| Variable | Default | Description |
|---|---|---|
DEMO_MODE |
false |
Enable demo mode banner |
BUY_ME_COFFEE_URL |
- | Buy Me a Coffee link for demo banner |
Example:
DEMO_MODE=true
BUY_ME_COFFEE_URL=https://www.buymeacoffee.com/yourname| Variable | Default | Description |
|---|---|---|
SLACK_EVENTS_CHANNEL_URL |
- | Slack channel URL for events |
Example:
SLACK_EVENTS_CHANNEL_URL=https://yourworkspace.slack.com/archives/C123456Frontend configuration is done through environment variables prefixed with VITE_:
| Variable | Default | Description |
|---|---|---|
VITE_API_BASE_URL |
/api |
API base URL |
VITE_GRPC_WEB_URL |
- | gRPC-Web endpoint (if using) |
Example (.env.local):
VITE_API_BASE_URL=https://api.tracker.example.com/apiCreate a .env file in the same directory as docker-compose.yml:
# .env
DEMO_MODE=false
DB_NAME=tracker_production
SLACK_EVENTS_CHANNEL_URL=https://yourworkspace.slack.com/archives/C123456Then reference in docker-compose.yml:
services:
tracker:
env_file:
- .env
environment:
DB_HOST: mongodb
DB_PORT: 27017apiVersion: v1
kind: ConfigMap
metadata:
name: tracker-config
data:
DB_HOST: "mongodb-service"
DB_PORT: "27017"
DB_NAME: "tracker"
HTTP_PORT: "8080"
GRPC_PORT: "8765"
LOG_LEVEL: "info"For sensitive data:
apiVersion: v1
kind: Secret
metadata:
name: tracker-secrets
type: Opaque
stringData:
DB_USER: "tracker_user"
DB_PASSWORD: "secure_password"Apply to deployment:
apiVersion: apps/v1
kind: Deployment
metadata:
name: tracker
spec:
template:
spec:
containers:
- name: tracker
envFrom:
- configMapRef:
name: tracker-config
- secretRef:
name: tracker-secretsTracker supports MongoDB connection strings:
DB_CONNECTION_STRING=mongodb://user:password@host1:27017,host2:27017/tracker?replicaSet=rs0For high availability:
DB_HOST=mongo1:27017,mongo2:27017,mongo3:27017
DB_REPLICA_SET=rs0
DB_NAME=trackerWith authentication enabled:
DB_HOST=mongodb.example.com
DB_PORT=27017
DB_NAME=tracker
DB_USER=tracker_user
DB_PASSWORD=secure_password
DB_AUTH_SOURCE=adminFor secure connections:
DB_TLS_ENABLED=true
DB_TLS_CA_FILE=/path/to/ca.pem
DB_TLS_CERT_FILE=/path/to/cert.pem
DB_TLS_KEY_FILE=/path/to/key.pemdebug: Detailed debugging informationinfo: General informational messages (default)warn: Warning messageserror: Error messages only
LOG_LEVEL=infoJSON (recommended for production):
LOG_FORMAT=jsonText (human-readable for development):
LOG_FORMAT=textTracker exposes Prometheus metrics on the metrics port.
Access metrics:
curl http://localhost:8081/metricsPrometheus scrape config:
scrape_configs:
- job_name: 'tracker'
static_configs:
- targets: ['tracker:8081']Tracker automatically creates indexes on startup. Monitor index usage:
# Connect to MongoDB
mongosh tracker
# Check indexes
db.events.getIndexes()
db.catalog.getIndexes()Configure MongoDB connection pool:
DB_MAX_POOL_SIZE=100
DB_MIN_POOL_SIZE=10HTTP_READ_TIMEOUT=30s
HTTP_WRITE_TIMEOUT=30s
GRPC_TIMEOUT=30sCORS_ALLOWED_ORIGINS=https://tracker.example.com,https://app.example.com
CORS_ALLOWED_METHODS=GET,POST,PUT,DELETE
CORS_ALLOWED_HEADERS=Content-Type,AuthorizationRATE_LIMIT_ENABLED=true
RATE_LIMIT_REQUESTS_PER_SECOND=100# .env.development
DB_HOST=localhost
DB_PORT=27017
DB_NAME=tracker_dev
HTTP_PORT=8080
GRPC_PORT=8765
LOG_LEVEL=debug
LOG_FORMAT=text
DEMO_MODE=true# .env.production
DB_HOST=mongodb-prod.example.com
DB_PORT=27017
DB_NAME=tracker
DB_USER=tracker_prod
DB_PASSWORD=${DB_PASSWORD} # From secrets manager
HTTP_PORT=8080
GRPC_PORT=8765
LOG_LEVEL=info
LOG_FORMAT=json
DEMO_MODE=false
CORS_ALLOWED_ORIGINS=https://tracker.example.com
RATE_LIMIT_ENABLED=trueversion: '3.8'
services:
mongodb:
image: mongo:8
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: admin
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_PASSWORD}
volumes:
- mongodb_data:/data/db
networks:
- tracker-network
tracker:
image: bananaops/tracker:latest
restart: always
environment:
DB_HOST: mongodb
DB_PORT: 27017
DB_NAME: tracker
DB_USER: admin
DB_PASSWORD: ${MONGO_PASSWORD}
DB_AUTH_SOURCE: admin
LOG_LEVEL: info
LOG_FORMAT: json
DEMO_MODE: false
ports:
- "8080:8080"
- "8081:8081"
- "8765:8765"
depends_on:
- mongodb
networks:
- tracker-network
networks:
tracker-network:
driver: bridge
volumes:
mongodb_data:-
Check environment variables are set:
docker exec tracker env | grep DB_
-
Restart the service:
docker-compose restart tracker
-
Verify MongoDB is accessible:
telnet mongodb.example.com 27017
-
Check credentials:
mongosh "mongodb://user:password@host:27017/tracker"
Change ports in configuration:
HTTP_PORT=9080
GRPC_PORT=9765
METRICS_PORT=9081- Installation Guide - Install Tracker
- Development Guide - Set up development environment
- User Guide - Learn how to use Tracker