Replace supervisord with caretakerd

This commit is contained in:
Daniel Berteaud 2024-01-05 16:05:09 +01:00
parent 4d53b13d4a
commit f00269c0f2
9 changed files with 22 additions and 59 deletions

View File

@ -1,7 +1,8 @@
FROM [[ .docker.repo ]][[ .docker.base_images.alma9.image ]]
MAINTAINER [[ .docker.maintainer ]]
ARG OO_VERSION=7.5.1
ARG OO_VERSION=7.5.1 \
CARETAKERD_VERSION=1.0.8
ENV LANG=[[ .locale.lang ]] \
TZ=[[ .locale.tz ]] \
@ -35,9 +36,11 @@ RUN set -euxo pipefail &&\
dnf \
postgresql16 \
onlyoffice-documentserver \
supervisor \
nginx \
&&\
curl -sSL https://github.com/echocat/caretakerd/releases/download/v${CARETAKERD_VERSION}/caretakerd-linux-amd64.tar.gz | \
tar xvz --exclude caretakerd.html -C /usr/local/bin &&\
chmod +x /usr/local/bin/caretakerd &&\
dnf clean all &&\
rm -rf /var/cache/dnf/* /var/cache/yum/* /var/log/dnf* /var/log/yum/* /var/lib/dnf/history*
@ -47,4 +50,4 @@ EXPOSE 8819
USER ds
CMD ["supervisord", "-n", "-c", "/etc/supervisord.conf"]
CMD ["caretakerd", "run"]

View File

@ -0,0 +1,15 @@
services:
docserver:
type: master
command: ["/var/www/onlyoffice/documentserver/server/DocService/docservice"]
preCommands:
- ["rm", "-f", "/tmp/oods.sock"]
directory: /var/www/onlyoffice/documentserver/server/DocService
metrics:
command: ["/var/www/onlyoffice/documentserver/server/Metrics/metrics", "./config/config.js"]
directory: /var/www/onlyoffice/documentserver/server/Metrics
converter:
command: ["/var/www/onlyoffice/documentserver/server/FileConverter/converter"]
directory: /var/www/onlyoffice/documentserver/server/FileConverter
nginx:
command: ["/usr/sbin/nginx", "-c", "/tmp/nginx.conf"]

View File

@ -1,8 +0,0 @@
[supervisord]
pidfile=/tmp/supervisord.pi
nodaemon=true
logfile=/dev/stdout
logfile_maxbytes=0
[include]
files = supervisord.d/*.ini

View File

@ -1,11 +0,0 @@
[program:converter]
command=/var/www/onlyoffice/documentserver/server/FileConverter/converter
directory=/var/www/onlyoffice/documentserver/server/FileConverter
stdout_logfile=/proc/self/fd/1
stdout_logfile_backups=0
stdout_logfile_maxbytes=0
stderr_logfile=/proc/self/fd/2
stderr_logfile_backups=0
stderr_logfile_maxbytes=0
autostart=true
autorestart=true

View File

@ -1,11 +0,0 @@
[program:docservice]
command=sh -c "rm -f /tmp/oods.sock && exec /var/www/onlyoffice/documentserver/server/DocService/docservice"
directory=/var/www/onlyoffice/documentserver/server/DocService
stdout_logfile=/proc/self/fd/1
stdout_logfile_backups=0
stdout_logfile_maxbytes=0
stderr_logfile=/proc/self/fd/2
stderr_logfile_backups=0
stderr_logfile_maxbytes=0
autostart=true
autorestart=true

View File

@ -1,11 +0,0 @@
[program:metrics]
command=/var/www/onlyoffice/documentserver/server/Metrics/metrics ./config/config.js
directory=/var/www/onlyoffice/documentserver/server/Metrics
stdout_logfile=/proc/self/fd/1
stdout_logfile_backups=0
stdout_logfile_maxbytes=0
stderr_logfile=/proc/self/fd/2
stderr_logfile_backups=0
stderr_logfile_maxbytes=0
autostart=true
autorestart=true

View File

@ -1,12 +0,0 @@
[program:nginx]
command=/usr/sbin/nginx -c /tmp/nginx.conf
directory=/
stdout_logfile=/proc/self/fd/1
stdout_logfile_backups=0
stdout_logfile_maxbytes=0
stderr_logfile=/proc/self/fd/2
stderr_logfile_backups=0
stderr_logfile_maxbytes=0
autostart=true
autorestart=true

View File

@ -1,2 +0,0 @@
[group:ds]
programs=docservice,converter,metrics,nginx

View File

@ -9,7 +9,7 @@ oo:
# Document Services
ds:
# Docker image to use
image: '[[ .docker.repo ]]onlyoffice-docserver:7.5.1-5'
image: '[[ .docker.repo ]]onlyoffice-docserver:7.5.1-8'
# Resource allocation for OnlyOffice itself
resources: