-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
185 lines (156 loc) · 6.41 KB
/
.env.example
File metadata and controls
185 lines (156 loc) · 6.41 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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
# =============================================================================
# Order-Service - Environment Configuration
# =============================================================================
# Copy this file to .env and update the values
# Compatible with TFO-Collector v1.1.2 (OCB-native)
# =============================================================================
# -----------------------------------------------------------------------------
# GENERAL
# -----------------------------------------------------------------------------
TZ=UTC
ENV=development
# -----------------------------------------------------------------------------
# SERVER
# -----------------------------------------------------------------------------
SERVER_PORT=8080
SERVER_READ_TIMEOUT=15s
SERVER_WRITE_TIMEOUT=15s
# -----------------------------------------------------------------------------
# DATABASE (PostgreSQL)
# -----------------------------------------------------------------------------
DB_DRIVER=postgres
DB_HOST=localhost
DB_PORT=5432
DB_NAME=orders
DB_USER=postgres
DB_PASSWORD=your_password_here
DB_SSL_MODE=disable
DB_MAX_OPEN_CONNS=25
DB_MAX_IDLE_CONNS=5
DB_CONN_MAX_LIFETIME=5m
# -----------------------------------------------------------------------------
# JWT AUTHENTICATION
# -----------------------------------------------------------------------------
JWT_SECRET=your_jwt_secret_here_min_64_chars_recommended
JWT_REFRESH_SECRET=your_refresh_secret_here_min_64_chars_recommended
JWT_EXPIRATION=24h
JWT_REFRESH_EXPIRATION=168h
SESSION_SECRET=your_session_secret_here_min_64_chars_recommended
# -----------------------------------------------------------------------------
# RATE LIMITING
# -----------------------------------------------------------------------------
RATE_LIMIT_REQUESTS=100
RATE_LIMIT_WINDOW=1m
# -----------------------------------------------------------------------------
# TELEMETRYFLOW SDK - Core Settings
# Compatible with TFO-Collector v1.1.2 (OCB-native)
# -----------------------------------------------------------------------------
TELEMETRYFLOW_API_KEY_ID=tfk_your_key_id
TELEMETRYFLOW_API_KEY_SECRET=tfs_your_key_secret
TELEMETRYFLOW_ENDPOINT=localhost:4317
TELEMETRYFLOW_SERVICE_NAME=Order-Service
TELEMETRYFLOW_SERVICE_VERSION=1.1.2
TELEMETRYFLOW_SERVICE_NAMESPACE=telemetryflow
TELEMETRYFLOW_ENVIRONMENT=development
TELEMETRYFLOW_INSECURE=true
# -----------------------------------------------------------------------------
# TELEMETRYFLOW SDK - TFO v2 API Settings (aligned with tfoexporter)
# -----------------------------------------------------------------------------
# Enable TFO v2 API (default: true)
TELEMETRYFLOW_USE_V2_API=true
# Enable v2-only mode - disables v1 endpoints (default: false)
TELEMETRYFLOW_V2_ONLY=false
# Custom endpoint paths (defaults to v2 when USE_V2_API=true)
# TELEMETRYFLOW_TRACES_ENDPOINT=/v2/traces
# TELEMETRYFLOW_METRICS_ENDPOINT=/v2/metrics
# TELEMETRYFLOW_LOGS_ENDPOINT=/v2/logs
# -----------------------------------------------------------------------------
# TELEMETRYFLOW SDK - Collector Identity (aligned with tfoidentityextension)
# -----------------------------------------------------------------------------
TELEMETRYFLOW_COLLECTOR_ID=
TELEMETRYFLOW_COLLECTOR_NAME=Order-Service SDK Client
TELEMETRYFLOW_COLLECTOR_HOSTNAME=
TELEMETRYFLOW_DATACENTER=default
# Enable resource enrichment (default: true)
TELEMETRYFLOW_ENRICH_RESOURCES=true
# -----------------------------------------------------------------------------
# TELEMETRYFLOW SDK - Protocol Settings
# -----------------------------------------------------------------------------
# Protocol: grpc or http (default: grpc)
TELEMETRYFLOW_PROTOCOL=grpc
# Enable compression (default: false)
TELEMETRYFLOW_COMPRESSION=false
# Timeout in seconds (default: 10)
TELEMETRYFLOW_TIMEOUT=10
# -----------------------------------------------------------------------------
# TELEMETRYFLOW SDK - Retry Settings
# -----------------------------------------------------------------------------
# Enable retry (default: true)
TELEMETRYFLOW_RETRY_ENABLED=true
# Max retries (default: 3)
TELEMETRYFLOW_MAX_RETRIES=3
# Retry backoff in milliseconds (default: 500)
TELEMETRYFLOW_RETRY_BACKOFF=500
# -----------------------------------------------------------------------------
# TELEMETRYFLOW SDK - Batch Settings
# -----------------------------------------------------------------------------
# Batch timeout in milliseconds (default: 5000)
TELEMETRYFLOW_BATCH_TIMEOUT=5000
# Max batch size (default: 512)
TELEMETRYFLOW_BATCH_MAX_SIZE=512
# -----------------------------------------------------------------------------
# TELEMETRYFLOW SDK - Signals
# -----------------------------------------------------------------------------
# Enable specific signals (all enabled by default)
TELEMETRYFLOW_ENABLE_TRACES=true
TELEMETRYFLOW_ENABLE_METRICS=true
TELEMETRYFLOW_ENABLE_LOGS=true
# Enable exemplars for metrics-to-traces correlation (default: true)
TELEMETRYFLOW_ENABLE_EXEMPLARS=true
# -----------------------------------------------------------------------------
# TELEMETRYFLOW SDK - Rate Limiting
# -----------------------------------------------------------------------------
# Maximum requests per second (0 = unlimited)
TELEMETRYFLOW_RATE_LIMIT=0
# -----------------------------------------------------------------------------
# LOGGING
# -----------------------------------------------------------------------------
LOG_LEVEL=info
LOG_FORMAT=json
# -----------------------------------------------------------------------------
# DOCKER COMPOSE - Container Settings
# -----------------------------------------------------------------------------
# PostgreSQL
POSTGRES_VERSION=16-alpine
CONTAINER_POSTGRES=tfo_sdk_postgresql
CONTAINER_IP_POSTGRES=172.152.152.20
PORT_POSTGRES=5432
# API
CONTAINER_API=tfo_sdk_restapi
CONTAINER_IP_API=172.152.152.10
PORT=8080
# OpenTelemetry Collector
OTEL_VERSION=0.142.0
CONTAINER_OTEL=tfo_sdk_collector
CONTAINER_IP_OTEL=172.152.152.30
PORT_OTEL_GRPC=4317
PORT_OTEL_HTTP=4318
PORT_OTEL_METRICS=8889
PORT_OTEL_HEALTH=13133
# Jaeger
JAEGER_VERSION=2.13.0
CONTAINER_JAEGER=tfo_sdk_jaeger
CONTAINER_IP_JAEGER=172.152.152.40
PORT_JAEGER_UI=16686
# Prometheus
PROMETHEUS_VERSION=v3.4.0
CONTAINER_PROMETHEUS=tfo_sdk_prometheus
CONTAINER_IP_PROMETHEUS=172.152.152.50
PORT_PROMETHEUS=9090
# Grafana
GRAFANA_VERSION=12.3.1
CONTAINER_GRAFANA=tfo_sdk_grafana
CONTAINER_IP_GRAFANA=172.152.152.60
PORT_GRAFANA=3000
GRAFANA_ADMIN_USER=admin
GRAFANA_ADMIN_PASSWORD=admin