-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
142 lines (135 loc) · 3.35 KB
/
docker-compose.yml
File metadata and controls
142 lines (135 loc) · 3.35 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
services:
# Jaeger all-in-one for distributed tracing.
#
# Bring it up: docker compose up -d jaeger
# Run the DB: STOREMY_OTEL=1 cargo run -- repl
# Open the UI: http://localhost:16686
# Tear it down: docker compose down jaeger
jaeger:
image: jaegertracing/all-in-one:1.62
container_name: storemy-jaeger
restart: unless-stopped
ports:
- "16686:16686" # web UI
- "4317:4317" # OTLP gRPC (default for STOREMY_OTEL_ENDPOINT)
- "4318:4318" # OTLP HTTP (alternative)
environment:
COLLECTOR_OTLP_ENABLED: "true"
storemy:
build:
context: .
dockerfile: Dockerfile
container_name: storemy
stdin_open: true # Keep STDIN open for interactive terminal
tty: true # Allocate a pseudo-TTY for terminal UI
volumes:
- storemy-data:/app/data
environment:
- DATA_DIR=/app/data
- TERM=xterm-256color # Enable colors in terminal
networks:
- storemy-network
# Test Runner Service (for automated testing)
storemy-test:
build:
context: .
dockerfile: Dockerfile.dev
container_name: storemy-test
volumes:
- .:/app
- storemy-test-data:/app/test_data
working_dir: /app
command:
[
"cargo",
"test",
"-p",
"storemy",
"--test",
"integration",
"--locked",
"--release",
]
networks:
- storemy-network
prometheus:
image: prom/prometheus:latest
container_name: storemy-prometheus
volumes:
- ./monitoring/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- prometheus-data:/prometheus
command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.path=/prometheus"
- "--web.console.libraries=/etc/prometheus/console_libraries"
- "--web.console.templates=/etc/prometheus/consoles"
ports:
- "9090:9090"
networks:
- storemy-network
profiles:
- monitoring
grafana:
image: grafana/grafana:latest
container_name: storemy-grafana
volumes:
- ./monitoring/grafana/dashboards:/etc/grafana/provisioning/dashboards:ro
- ./monitoring/grafana/datasources:/etc/grafana/provisioning/datasources:ro
- grafana-data:/var/lib/grafana
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=storemy
- GF_USERS_ALLOW_SIGN_UP=false
ports:
- "3000:3000"
depends_on:
- prometheus
networks:
- storemy-network
profiles:
- monitoring
storemy-metrics:
build:
context: .
dockerfile: Dockerfile.dev
container_name: storemy-metrics
volumes:
- .:/app
- storemy-data:/app/data
- storemy-metrics-logs:/app/metrics_logs
environment:
- DB_NAME=storemy_db
- DATA_DIR=/app/data
- LOG_DIR=/app/metrics_logs
- METRICS_PORT=8080
command:
[
"cargo",
"run",
"--release",
"--locked",
"-p",
"storemy",
"--bin",
"metrics_exporter",
]
ports:
- "8080:8080"
networks:
- storemy-network
profiles:
- monitoring
volumes:
storemy-data:
driver: local
storemy-test-data:
driver: local
storemy-metrics-logs:
driver: local
prometheus-data:
driver: local
grafana-data:
driver: local
networks:
storemy-network:
driver: bridge