From 4160b51e22721b40b62e2b5ef1f6db335d3b68f3 Mon Sep 17 00:00:00 2001 From: DerTyp7 Date: Fri, 24 Nov 2023 14:56:27 +0100 Subject: [PATCH] Update response message in RequestHandler class --- app/app.py | 2 +- nginx.conf | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 nginx.conf diff --git a/app/app.py b/app/app.py index 9ba223e..d309ea2 100644 --- a/app/app.py +++ b/app/app.py @@ -50,7 +50,7 @@ class RequestHandler(threading.Thread): print('starting docker container {}'.format(container_ip)) self.docker_handler.get_container_by_ip(container_ip).start() # Send a response - self.connection.sendall(b'Request handled') + self.connection.sendall("Server starting...".encode('utf-8')) else: print('no docker container mapped to this port') diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..f9708af --- /dev/null +++ b/nginx.conf @@ -0,0 +1,19 @@ +events { } + stream { + upstream upstream_25565 { + server 172.20.0.3:25565; + server 127.0.0.1:25565 backup; + } + server { + listen 172.20.0.2:25565; + proxy_pass upstream_25565; + } + upstream upstream_25566 { + server 172.20.0.4:25565; + server 127.0.0.1:25566 backup; + } + server { + listen 172.20.0.2:25566; + proxy_pass upstream_25566; + } + } \ No newline at end of file