mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-21 17:06:23 +00:00
realizar la limpieza mensualmente
This commit is contained in:
parent
170cbeb69e
commit
3b616198ea
4 changed files with 8 additions and 33 deletions
|
@ -2,3 +2,4 @@
|
|||
*
|
||||
# Solo agregar lo que usamos en COPY
|
||||
# !./archivo
|
||||
!./monit.conf
|
||||
|
|
|
@ -15,6 +15,8 @@ RUN apk add --no-cache libxslt libxml2 postgresql-libs libssh2 \
|
|||
RUN gem install --no-document --no-user-install foreman
|
||||
RUN wget https://github.com/jgm/pandoc/releases/download/${PANDOC_VERSION}/pandoc-${PANDOC_VERSION}-linux-amd64.tar.gz -O - | tar --strip-components 1 -xvzf - pandoc-${PANDOC_VERSION}/bin/pandoc && mv /bin/pandoc /usr/bin/pandoc
|
||||
|
||||
COPY ./monit.conf /etc/monit.d/sutty.conf
|
||||
|
||||
VOLUME "/srv"
|
||||
|
||||
EXPOSE 3000
|
||||
|
|
8
Procfile
8
Procfile
|
@ -1,7 +1 @@
|
|||
migrate: bundle exec rake db:prepare db:seed
|
||||
sutty: bundle exec puma config.ru
|
||||
blazer_5m: bundle exec rake blazer:run_checks SCHEDULE="5 minutes"
|
||||
blazer_1h: bundle exec rake blazer:run_checks SCHEDULE="1 hour"
|
||||
blazer_1d: bundle exec rake blazer:run_checks SCHEDULE="1 day"
|
||||
blazer: bundle exec rake blazer:send_failing_checks
|
||||
prometheus: bundle exec prometheus_exporter -b 0.0.0.0 --prefix "sutty_"
|
||||
cleanup: rake cleanup:everything
|
||||
|
|
30
monit.conf
30
monit.conf
|
@ -1,27 +1,5 @@
|
|||
check process sutty with pidfile /srv/tmp/puma.pid
|
||||
start program = "/usr/local/bin/sutty start"
|
||||
stop program = "/usr/local/bin/sutty stop"
|
||||
|
||||
check process prometheus with pidfile /tmp/prometheus.pid
|
||||
start program = "/usr/local/bin/sutty prometheus start"
|
||||
stop program = "/usr/local/bin/sutty prometheus start"
|
||||
|
||||
check program blazer_5m
|
||||
with path "/usr/local/bin/sutty blazer 5m"
|
||||
every 5 cycles
|
||||
if status != 0 then alert
|
||||
|
||||
check program blazer_1h
|
||||
with path "/usr/local/bin/sutty blazer 1h"
|
||||
every 60 cycles
|
||||
if status != 0 then alert
|
||||
|
||||
check program blazer_1d
|
||||
with path "/usr/local/bin/sutty blazer 1d"
|
||||
every 1440 cycles
|
||||
if status != 0 then alert
|
||||
|
||||
check program blazer
|
||||
with path "/usr/local/bin/sutty blazer"
|
||||
every 61 cycles
|
||||
# Limpiar mensualmente
|
||||
check program cleanup
|
||||
with path "/usr/bin/foreman run -f /srv/Procfile -d /srv " as uid "rails" gid "http-data"
|
||||
every "0 3 1 * *"
|
||||
if status != 0 then alert
|
||||
|
|
Loading…
Reference in a new issue