@@ -2,6 +2,7 @@ name: ttt
22
33services :
44 ttt :
5+ image : ttt:prod
56 build :
67 context : ../../
78 dockerfile : deploy/prod/ttt/Dockerfile
@@ -86,7 +87,7 @@ services:
8687 mem_limit : 30mb
8788 healthcheck :
8889 test : pg_isready -d ttt -U ttt
89- start_period : 1m
90+ start_period : 2m
9091 start_interval : 1s
9192 interval : 5s
9293
@@ -116,7 +117,7 @@ services:
116117 mem_limit : 30mb
117118 healthcheck :
118119 test : pg_isready -d ttt -U ttt
119- start_period : 1m
120+ start_period : 2m
120121 start_interval : 1s
121122 interval : 5s
122123
@@ -154,6 +155,63 @@ services:
154155 entrypoint : [""]
155156 command : ["bash", "/mnt/add_streams.sh"]
156157
158+ alloy :
159+ image : grafana/alloy:v1.10.0
160+ container_name : ttt-alloy
161+ # ports:
162+ # - 12345:12345
163+ # - 4317:4317
164+ # - 4318:4318
165+ volumes :
166+ - ./alloy/config.alloy:/etc/alloy/config.alloy
167+ - /var/run/docker.sock:/var/run/docker.sock
168+ networks :
169+ - loki
170+ command : run --server.http.listen-addr=0.0.0.0:12345 --storage.path=/var/lib/alloy/data /etc/alloy/config.alloy
171+ depends_on :
172+ - loki
173+
174+ loki :
175+ image : grafana/loki:3.4.5
176+ container_name : ttt-loki
177+ environment :
178+ TZ : ${SYSTEM_TIMEZONE:-Europe/Moscow}
179+ # ports:
180+ # - 3100:3100
181+ volumes :
182+ - loki-data:/loki
183+ - ./loki/loki-config.yaml:/etc/loki/local-config.yaml
184+ networks :
185+ - loki
186+ command : -config.file=/etc/loki/local-config.yaml
187+
188+ grafana :
189+ image : grafana/grafana:12.0.2-ubuntu
190+ container_name : ttt-grafana
191+ environment :
192+ - GF_PATHS_PROVISIONING=/etc/grafana/provisioning
193+ - GF_FEATURE_TOGGLES_ENABLE=grafanaManagedRecordingRules
194+
195+ - GF_AUTH_ANONYMOUS_ENABLED=false
196+ - GF_AUTH_BASIC_ENABLED=true
197+
198+ - GF_SECURITY_FORCE_PASSWORD_CHANGE=true
199+ - GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION=false
200+ - GF_SECURITY_ADMIN_USER=admin
201+ - GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_ADMIN_PASSWORD}
202+ - GF_SECURITY_MIN_PASSWORD_LENGTH=4
203+
204+ - GF_USERS_ALLOW_SIGN_UP=false
205+
206+ - TZ=${SYSTEM_TIMEZONE:-Europe/Moscow}
207+ ports :
208+ - 3000:3000
209+ volumes :
210+ - grafana-data:/var/lib/grafana
211+ - ./grafana/provisioning/datasources:/etc/grafana/provisioning/datasources
212+ networks :
213+ - loki
214+
157215volumes :
158216 postgres-replica1-data :
159217 name : " ttt-prod-postgres-replica1-data"
@@ -163,11 +221,16 @@ volumes:
163221 name : " ttt-prod-redis-data"
164222 nats-data :
165223 name : " ttt-prod-nats-data"
224+ loki-data :
225+ name : " ttt-prod-loki-data"
226+ grafana-data :
227+ name : " ttt-prod-grafana-data"
166228
167229networks :
168230 postgres : null
169231 redis : null
170232 nats : null
233+ loki : null
171234
172235secrets :
173236 secrets :
0 commit comments