Allow to read hostname from config file
This commit is contained in:
		@@ -59,6 +59,7 @@ if [ -f "$PROJECT/docker-compose.override.yml" ]; then
 | 
				
			|||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
detectCompose
 | 
					detectCompose
 | 
				
			||||||
 | 
					setHostname
 | 
				
			||||||
 | 
					
 | 
				
			||||||
case "$ACTION" in
 | 
					case "$ACTION" in
 | 
				
			||||||
	start)
 | 
						start)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -125,12 +125,17 @@ fail_and_report() {
 | 
				
			|||||||
	exit $1
 | 
						exit $1
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					setHostname() {
 | 
				
			||||||
 | 
						if [ -z "$HOST" ]; then
 | 
				
			||||||
 | 
							export HOST=$(hostname -f)
 | 
				
			||||||
 | 
							log DEBUG "Using auto-detected hostname $HOST."
 | 
				
			||||||
 | 
						fi
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
##Setting Network properties
 | 
					##Setting Network properties
 | 
				
			||||||
# currently not needed
 | 
					# currently not needed
 | 
				
			||||||
#export HOSTIP=$(MSYS_NO_PATHCONV=1 docker run --rm --add-host=host.docker.internal:host-gateway ubuntu cat /etc/hosts | grep 'host.docker.internal' | awk '{print $1}');
 | 
					#export HOSTIP=$(MSYS_NO_PATHCONV=1 docker run --rm --add-host=host.docker.internal:host-gateway ubuntu cat /etc/hosts | grep 'host.docker.internal' | awk '{print $1}');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export HOST=$(hostname -f)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
export PRODUCTION="false";
 | 
					export PRODUCTION="false";
 | 
				
			||||||
if [ "$(git branch --show-current)" == "main" ]; then
 | 
					if [ "$(git branch --show-current)" == "main" ]; then
 | 
				
			||||||
	export PRODUCTION="true";
 | 
						export PRODUCTION="true";
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user