mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-04-24 01:28:42 +02:00
docker: add single-container support
This commit is contained in:
9
docker/prod/supervisord/start
Normal file
9
docker/prod/supervisord/start
Normal file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
set -o nounset
|
||||
|
||||
export TASK_WORKERS=${TASK_WORKERS:=1}
|
||||
|
||||
exec supervisord -c /etc/supervisor/conf.d/supervisord.conf
|
||||
40
docker/prod/supervisord/supervisord.conf
Normal file
40
docker/prod/supervisord/supervisord.conf
Normal file
@@ -0,0 +1,40 @@
|
||||
[supervisord]
|
||||
nodaemon=true
|
||||
logfile=/dev/null
|
||||
logfile_maxbytes=0
|
||||
pidfile=/tmp/supervisord.pid
|
||||
|
||||
[supervisorctl]
|
||||
serverurl=unix:///run/supervisord.sock
|
||||
|
||||
[rpcinterface:supervisor]
|
||||
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
||||
|
||||
[unix_http_server]
|
||||
file=/run/supervisord.sock
|
||||
chmod=0700
|
||||
|
||||
[program:web]
|
||||
user=app
|
||||
directory=/usr/src/app
|
||||
command=/bin/bash /start
|
||||
stdout_logfile=/dev/fd/1
|
||||
stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/fd/2
|
||||
stderr_logfile_maxbytes=0
|
||||
autorestart=true
|
||||
startretries=5
|
||||
|
||||
[program:procrastinate]
|
||||
user=app
|
||||
directory=/usr/src/app
|
||||
command=/bin/bash /start-procrastinate
|
||||
process_name=%(program_name)s_%(process_num)02d
|
||||
numprocs=%(ENV_TASK_WORKERS)s
|
||||
numprocs_start=1
|
||||
stdout_logfile=/dev/fd/1
|
||||
stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/fd/2
|
||||
stderr_logfile_maxbytes=0
|
||||
autorestart=true
|
||||
startretries=5
|
||||
Reference in New Issue
Block a user