Fix placeholder server IP handling

This commit is contained in:
Janis
2023-11-24 23:19:36 +01:00
parent 62ede11ba9
commit 9f6a2acc94
2 changed files with 5 additions and 2 deletions

View File

@@ -68,6 +68,9 @@ class RequestHandler(threading.Thread):
print('Container is starting. Using starting placeholder IP')
ip = os.environ.get('PLACEHOLDER_SERVER_STARTING_IP')
if not ip:
print('No placeholder server IP found')
return
server_socket.connect(
(ip, 25565))
server_socket.sendall(request)

View File

@@ -1,7 +1,7 @@
version: "3.9"
networks:
# You need to have a network with static ips for the servers.
# You need to have a network with static ips for the servers
mc_network:
driver: bridge
ipam:
@@ -25,7 +25,7 @@ services:
# Port mapping for the servers
# The key is the external port of the placeholder server
# The value is the internal ip of the actual server
# Don't change the server port in the actual server. Use this instead.
# Don't change the server port in the actual server. Use this instead
PORT_IP_MAP: |
25565: 172.20.0.5
25566: 172.20.0.6