Skip to content
Snippets Groups Projects
Commit 863916cf authored by godog's avatar godog
Browse files

Move to S6 for process supervision

parent 963dd4ff
No related branches found
No related tags found
1 merge request!1Run with S6
FROM registry.git.autistici.org/ai3/docker/chaperone-base:master FROM registry.git.autistici.org/ai3/docker/s6-base:master
RUN apt-get -q update && \ RUN apt-get -q update && \
env DEBIAN_FRONTEND=noninteractive apt-get -qy install --no-install-recommends \ env DEBIAN_FRONTEND=noninteractive apt-get -qy install --no-install-recommends \
......
feedbackloop.service: {
command: "/bin/sh -c '/usr/local/bin/feedbackloop server --port=${PORT:-4099} --addr=${ADDR:-0.0.0.0}'",
exit_kills: true,
}
ingest.service: {
type: cron,
interval: "44 * * * *",
command: "/usr/local/bin/feedbackloop ingest",
}
expire.service: {
type: cron,
interval: "39 5 * * *",
command: "/usr/local/bin/feedbackloop expire --days=30",
}
#!/bin/sh
period=${EXPIRE_PERIOD_SECS:-86400}
offset=$(shuf -i 0-${period} -n 1)
sleep $offset
while true; do
/usr/local/bin/feedbackloop expire --days=30
sleep $period
done
#!/usr/bin/execlineb -S0
s6-svscanctl -t /var/run/s6/services
#!/bin/sh
exec /usr/local/bin/feedbackloop server --port=${PORT:-4099} --addr=${ADDR:-0.0.0.0}
#!/bin/sh
period=${INGEST_PERIOD_SECS:-3600}
offset=$(shuf -i 0-${period} -n 1)
sleep $offset
while true; do
/usr/local/bin/feedbackloop ingest
sleep $period
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment