Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
16f0335d76 | ||
|
|
52280acf41 | ||
|
|
1b274fa019 | ||
|
|
ba4803d660 | ||
|
|
ac198e5731 |
+6
-2
@@ -1,5 +1,9 @@
|
||||
FROM avatao/frontend-tutorial-framework:chausie-20191021 as frontend
|
||||
ARG FRONTEND_VERSION
|
||||
FROM avatao/frontend-tutorial-framework:${FRONTEND_VERSION} as frontend
|
||||
|
||||
FROM avatao/debian:buster
|
||||
ARG FRONTEND_VERSION
|
||||
LABEL tfw.frontend.version=${FRONTEND_VERSION}
|
||||
|
||||
RUN apt-get update &&\
|
||||
apt-get install -y --no-install-recommends \
|
||||
@@ -69,7 +73,7 @@ ONBUILD COPY ${BUILD_CONTEXT}/supervisor/ ${TFW_SUPERVISORD_COMPONENTS}
|
||||
ONBUILD RUN for f in "${TFW_NGINX_DEFAULT}" ${TFW_NGINX_COMPONENTS}/*.conf; do \
|
||||
envsubst "$(printenv | cut -d= -f1 | grep TFW_ | sed -e 's/^/$/g')" < $f > $f~ && mv $f~ $f ;\
|
||||
done
|
||||
ONBUILD VOLUME ["/etc/nginx", "/var/lib/nginx", "/var/log/nginx", "${TFW_LIB_DIR}/tfw"]
|
||||
ONBUILD VOLUME ["/etc/nginx", "/etc/supervisor", "/var/lib/nginx", "/var/log/nginx", "${TFW_LIB_DIR}/tfw"]
|
||||
|
||||
ENTRYPOINT ["/bin/init", "--"]
|
||||
CMD exec supervisord --nodaemon --configuration ${TFW_SUPERVISORD_CONF}
|
||||
|
||||
@@ -12,7 +12,7 @@ class FrontendConfigHandler:
|
||||
def handle_event(self, _, connector):
|
||||
# pylint: disable=no-self-use
|
||||
for message in self._config_messages:
|
||||
connector.send_message(message)
|
||||
connector.send_message(message, scope=Scope.WEBSOCKET)
|
||||
connector.send_message({'key': 'frontend.ready'}, scope=Scope.WEBSOCKET)
|
||||
|
||||
@property
|
||||
|
||||
@@ -42,6 +42,9 @@ class TerminalHandler:
|
||||
LOG.error('IGNORING MESSAGE: Invalid message received: %s', message)
|
||||
|
||||
def handle_write(self, message):
|
||||
concat = message.get('concat', False)
|
||||
if not concat:
|
||||
self.terminado_server.pty.write('\x15')
|
||||
self.terminado_server.pty.write(message['command'])
|
||||
|
||||
def cleanup(self):
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
from datetime import datetime
|
||||
from typing import TextIO, Union
|
||||
from dataclasses import dataclass
|
||||
from collections.abc import Mapping
|
||||
from traceback import format_exception
|
||||
from logging import DEBUG, getLogger, Handler, Formatter, Filter
|
||||
|
||||
@@ -81,7 +82,7 @@ class LogFormatter(Formatter):
|
||||
def format(self, record):
|
||||
time = datetime.utcfromtimestamp(record.created).strftime('%H:%M:%S')
|
||||
if record.args:
|
||||
tuple_args = (record.args,) if isinstance(record.args, dict) else record.args
|
||||
tuple_args = (record.args,) if isinstance(record.args, Mapping) else record.args
|
||||
clean_args = tuple((self.trim(arg) for arg in tuple_args))
|
||||
message = record.msg % clean_args
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user