Próbuję scentralizować dane wyjściowe od supervisora i jego procesów za pomocą supervisor-stdout
. Ale przy tej konfiguracji supervisord:Docker, Supervisord i supervisor-stdout
#supervisord.conf
[supervisord]
nodaemon = true
[program:nginx]
command = /usr/sbin/nginx
stdout_events_enabled = true
stderr_events_enabled = true
[eventlistener:stdout]
command = supervisor_stdout
buffer_size = 100
events = PROCESS_LOG
result_handler = supervisor_stdout:event_handler
(Zauważ, że sekcja config od nadzorcy-stoud jest dokładnie taka sama, jak na przykład the supervisor-stoud site).
... i to Dockerfile:
#Dockerfile
FROM python:3-onbuild
RUN apt-get update && apt-get install -y nginx supervisor
# Setup supervisord
RUN pip install supervisor-stdout
RUN mkdir -p /var/log/supervisor
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY nginx.conf /etc/nginx/nginx.conf
# restart nginx to load the config
RUN service nginx stop
# Start processes
CMD supervisord -c /etc/supervisor/conf.d/supervisord.conf -n
mogę zbudować wizerunek dobrze, ale działa pojemnik ze to daje mi:
Error: supervisor_stdout:event_handler cannot be resolved within [eventlistener:stdout]
EDIT
moc wyjściowa z pracy:
supervisord -c /etc/supervisor/conf.d/supervisord.conf -n
jest:
Error: supervisor_stdout:event_handler cannot be resolved within [eventlistener:stdout]
For help, use /usr/bin/supervisord -h
Co to jest wyjście polecenia 'supervisord -c /etc/supervisor/conf.d/supervisord.conf -n'' po uruchomieniu go ręcznie w kontenerze? Użyj: '' docker exec/bin/bash'' –
Dodane wyjście z uruchamiania 'supervisord -c /etc/supervisor/conf.d/supervisord.conf -n' –
Nie widzę, jak/dlaczego uzyskujesz drugi błąd, który zgłosiłeś w swoim pytaniu? –