-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.override.yaml
More file actions
118 lines (104 loc) · 3.53 KB
/
Copy pathdocker-compose.override.yaml
File metadata and controls
118 lines (104 loc) · 3.53 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
# Override file to add profiles and network configuration to official SigNoz services
# This file is automatically merged with docker-compose.yaml
# All SigNoz services are assigned to the "signoz" profile and connected to both networks
services:
# SigNoz infrastructure services
init-clickhouse:
profiles: ["signoz"]
networks:
- signoz-net
- default
zookeeper-1:
profiles: ["signoz"]
networks:
- signoz-net
- default
clickhouse:
profiles: ["signoz"]
networks:
- signoz-net
- default
ports:
- "9000:9000" # Expose for debugging
- "8123:8123" # HTTP interface
# Schema migration services
schema-migrator-sync:
profiles: ["signoz"]
command: ["sync", "--dsn=tcp://clickhouse:9000"] # Remove --up= flag
networks:
- signoz-net
- default
schema-migrator-async:
profiles: ["signoz"]
command: ["async", "--dsn=tcp://clickhouse:9000"] # Remove --up= flag
networks:
- signoz-net
- default
# SigNoz main application
signoz:
profiles: ["signoz"]
networks:
- signoz-net
- default
environment:
# Required for secure session tokens in SigNoz UI/API
SIGNOZ_TOKENIZER_JWT_SECRET: my-strong-random-secret
# OpenTelemetry Collector
otel-collector:
profiles: ["signoz"]
environment:
OTEL_LOG_LEVEL: debug # Add this
networks:
- signoz-net
- default
# Provision initial SigNoz org/admin on first run
signoz-bootstrap:
profiles: ["signoz"]
image: curlimages/curl:8.10.1
depends_on:
signoz:
condition: service_healthy
networks:
- signoz-net
- default
environment:
# Configure these in your .env to control bootstrap user/org
SIGNOZ_BOOTSTRAP_NAME: ${SIGNOZ_BOOTSTRAP_NAME:-signoz}
SIGNOZ_BOOTSTRAP_EMAIL: ${SIGNOZ_BOOTSTRAP_EMAIL:-admin@example.com}
SIGNOZ_BOOTSTRAP_PASSWORD: ${SIGNOZ_BOOTSTRAP_PASSWORD:-ilmanhintaHunter2.}
SIGNOZ_BOOTSTRAP_ORG_NAME: ${SIGNOZ_BOOTSTRAP_ORG_NAME:-ilmanhinta}
SIGNOZ_BOOTSTRAP_ORG_DISPLAY: ${SIGNOZ_BOOTSTRAP_ORG_DISPLAY:-Ilmanhinta}
entrypoint: ["/bin/sh", "-c"]
command:
- |
set -x
echo "Waiting for SigNoz API..."
until curl -sf http://signoz:8080/api/v1/health >/dev/null; do sleep 2; done
echo "Provisioning SigNoz initial org/admin..."
echo "Email: $$SIGNOZ_BOOTSTRAP_EMAIL"
echo "Org: $$SIGNOZ_BOOTSTRAP_ORG_NAME ($$SIGNOZ_BOOTSTRAP_ORG_DISPLAY)"
response=$$(curl -s -w "\n%{http_code}" \
-H "Content-Type: application/json" \
-X POST http://signoz:8080/api/v1/register \
-d "{
\"name\": \"$$SIGNOZ_BOOTSTRAP_NAME\",
\"email\": \"$$SIGNOZ_BOOTSTRAP_EMAIL\",
\"password\": \"$$SIGNOZ_BOOTSTRAP_PASSWORD\",
\"orgName\": \"$$SIGNOZ_BOOTSTRAP_ORG_NAME\",
\"orgDisplayName\": \"$$SIGNOZ_BOOTSTRAP_ORG_DISPLAY\"
}")
http_code=$$(echo "$$response" | tail -n1)
body=$$(echo "$$response" | sed '$$d')
echo "HTTP Status: $$http_code"
echo "Response Body: $$body"
if [ "$$http_code" = "200" ] || [ "$$http_code" = "201" ]; then
echo "✓ SigNoz admin/org created successfully"
exit 0
fi
if echo "$$body" | grep -qi "self-registration is disabled\|already exists"; then
echo "⚠ SigNoz already provisioned (this is OK)"
exit 0
fi
echo "✗ Bootstrap failed with code $$http_code"
exit 1
restart: "no"