add to tornado path

This commit is contained in:
mantaohuang 2020-08-03 12:40:28 -04:00
parent e3e0c47e2b
commit b339453d90
2 changed files with 3 additions and 1 deletions

View File

@ -18,6 +18,7 @@ FROM alpine:latest
RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing/" >> /etc/apk/repositories && \
apk --no-cache add openvpn iptables ip6tables bash python3 shadow neovim 3proxy fping tini
COPY --from=python-builder /mop /mop
RUN mkdir /mop/config
COPY --from=go-builder /ovpn-lb-socks5/go-socks-lb/go-socks-lb /mop/go-socks-lb
ENTRYPOINT ["/sbin/tini", "--"]
CMD /mop/docker-entrypoint.sh

View File

@ -125,7 +125,7 @@ class ClearCacheInstatnceHandler(tornado.web.RequestHandler):
om.clear_cache()
class SaveConfig(tornado.web.RequestHandler):
class SaveInstanceHandler(tornado.web.RequestHandler):
def get(self):
instances = om.serialize_instance_config()
with open(os.path.join(root), instance_config_fp, "w") as f:
@ -144,6 +144,7 @@ def make_app():
(r"/stop", StopInstatnceHandler),
(r"/remove", RemoveInstatnceHandler),
(r"/clear_cache", ClearCacheInstatnceHandler),
(r"/save_instance", SaveInstanceHandler),
(r"/dashboard/(.*)", tornado.web.StaticFileHandler,
{"path": os.path.join(root, "tabler"), "default_filename": "index.html"})
])