From 1cd91db14878e3a1f94f298e9b1ccc9ab79ee2b5 Mon Sep 17 00:00:00 2001
From: Jan David Mol <mol@astron.nl>
Date: Mon, 4 Oct 2021 08:24:05 +0200
Subject: [PATCH] L2SS-394: Support WSL out of the box with proper defaults.

---
 docker-compose/Makefile | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/docker-compose/Makefile b/docker-compose/Makefile
index ce7489db1..8e660436f 100644
--- a/docker-compose/Makefile
+++ b/docker-compose/Makefile
@@ -14,7 +14,12 @@ ATTACH_COMPOSE_FILE_ARGS := $(foreach yml,$(filter-out tango.yml,$(COMPOSE_FILES
 NETWORK_MODE ?= tangonet
 
 # Host name through which others can reach our control interfaces
-HOSTNAME ?= $(shell hostname -f)
+ifneq (,$(wildcard /run/WSL))
+    # Microsoft Windows Subsystem for Linux
+    HOSTNAME ?= host.docker.internal
+else
+    HOSTNAME ?= $(shell hostname -f)
+endif
 
 # If the first make argument is "start" or "stop"...
 ifeq (start,$(firstword $(MAKECMDGOALS)))
-- 
GitLab