fix(demo): delay generator start

This commit is contained in:
Łukasz Mierzwa
2022-09-15 15:05:03 +01:00
committed by Łukasz Mierzwa
parent 309236c42c
commit 7d810ba0c6
3 changed files with 31 additions and 19 deletions
+1
View File
@@ -26,6 +26,7 @@ FROM alpine:3.16
COPY --from=ghcr.io/prymitive/kthxbye:v0.15 /kthxbye /kthxbye
COPY --from=prom/alertmanager:v0.24.0 /bin/alertmanager /alertmanager
RUN apk add supervisor python3 && rm -rf /tmp/* /var/cache/apk/*
COPY demo/run.sh /run.sh
COPY demo/supervisord.conf /etc/supervisord.conf
COPY demo/alertmanager.yaml /etc/alertmanager.yaml
COPY demo/generator.py /generator.py
Executable
+4
View File
@@ -0,0 +1,4 @@
#!/bin/sh
sleep 5
$@
+26 -19
View File
@@ -6,6 +6,15 @@ logfile_maxbytes = 1MB
logfile_backups=0
loglevel = info
[program:prometheus]
command=/prometheus.py 8082
autorestart=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
priority=1
[program:alertmanager1]
command=/alertmanager --config.file=/etc/alertmanager.yaml --log.level=error --storage.path=/tmp/alertmanager1 --web.listen-address=:9093 --cluster.listen-address=127.0.0.1:8001 --cluster.peer=127.0.0.1:8002 --cluster.settle-timeout=1s
autorestart=true
@@ -13,6 +22,7 @@ stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
priority=1
[program:alertmanager2]
command=/alertmanager --config.file=/etc/alertmanager.yaml --log.level=error --storage.path=/tmp/alertmanager2 --web.listen-address=:9094 --cluster.listen-address=127.0.0.1:8002 --cluster.peer=127.0.0.1:8001 --cluster.settle-timeout=1s
@@ -21,6 +31,7 @@ stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
priority=1
[program:alertmanager3]
command=/alertmanager --config.file=/etc/alertmanager.yaml --log.level=error --storage.path=/tmp/alertmanager3 --web.listen-address=:9095 --cluster.listen-address=127.0.0.1:8003
@@ -29,35 +40,31 @@ stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
[program:generator]
command=/generator.py
autorestart=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
[program:karma]
command=/karma --config.file /etc/karma.yaml
autorestart=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
priority=1
[program:kthxbye]
command=/kthxbye -listen :8081
command=/run.sh /kthxbye -listen :8081
autorestart=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
priority=10
[program:prometheus]
command=/prometheus.py 8082
[program:karma]
command=/run.sh /karma --config.file /etc/karma.yaml
autorestart=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
priority=20
[program:generator]
command=/run.sh /generator.py
autorestart=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
priority=30