Expose supervisor to python clients

This commit is contained in:
Bálint Bokros 2018-01-10 16:31:36 +01:00
parent af3de243df
commit 3e14b000b1
3 changed files with 7 additions and 0 deletions

View File

@ -34,6 +34,7 @@ ENV PYTHONPATH=${TFW_LIB_DIR}
COPY lib $TFW_LIB_DIR COPY lib $TFW_LIB_DIR
ENV TFW_SUPERVISORD_CONF="/etc/supervisor/supervisord.conf" ENV TFW_SUPERVISORD_CONF="/etc/supervisor/supervisord.conf"
ENV TFW_SUPERVISOR_HTTP_PORT=9001
COPY supervisord.conf ${TFW_SUPERVISORD_CONF} COPY supervisord.conf ${TFW_SUPERVISORD_CONF}
ENV WEB_PORT=4242 ENV WEB_PORT=4242

View File

@ -3,3 +3,6 @@ import os
PUBLISHER_PORT = os.getenv('PUBLISHER_PORT', 7654) PUBLISHER_PORT = os.getenv('PUBLISHER_PORT', 7654)
RECEIVER_PORT = os.getenv('RECEIVER_PORT', 8765) RECEIVER_PORT = os.getenv('RECEIVER_PORT', 8765)
WEB_PORT = os.getenv('WEB_PORT', 4242) WEB_PORT = os.getenv('WEB_PORT', 4242)
SUPERVISOR_HTTP_PORT = os.getenv('TFW_SUPERVISOR_PORT', 9001)
SUPERVISOR_HTTP_URI = 'http://localhost:{}'.format(SUPERVISOR_HTTP_PORT)

View File

@ -7,6 +7,9 @@ pidfile = /tmp/supervisord.pid
[unix_http_server] [unix_http_server]
file=/tmp/supervisor.sock file=/tmp/supervisor.sock
[inet_http_server]
port = 127.0.0.1:%(ENV_TFW_SUPERVISOR_HTTP_PORT)s
[rpcinterface:supervisor] [rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface