Skip to content
Snippets Groups Projects
Commit 75f1b128 authored by Jan David Mol's avatar Jan David Mol
Browse files

L2SS-466: Introduce separate LOG_HOSTNAME to send logs to, representing the...

L2SS-466: Introduce separate LOG_HOSTNAME to send logs to, representing the HOSTNAME as resolvable from the host (instead of the containers or the clients)
parent 0d1faa45
No related branches found
No related tags found
1 merge request!169L2SS-466: Introduce separate LOG_HOSTNAME to send logs to, representing the...
......@@ -13,7 +13,8 @@ ATTACH_COMPOSE_FILE_ARGS := $(foreach yml,$(filter-out tango.yml,$(COMPOSE_FILES
# But we allow to overwrite it.
NETWORK_MODE ?= tangonet
# Host name through which others can reach our control interfaces
# Host name through which others can reach our control interfaces.
# Needs to be resolvable from the containers and clients.
ifneq (,$(wildcard /run/WSL))
# Microsoft Windows Subsystem for Linux
HOSTNAME ?= host.docker.internal
......@@ -21,6 +22,10 @@ else
HOSTNAME ?= $(shell hostname -f)
endif
# Host name to which to send our container logs. Needs to be resolvable from
# the host.
LOG_HOSTNAME ?= localhost
# If the first make argument is "start" or "stop"...
ifeq (start,$(firstword $(MAKECMDGOALS)))
SERVICE_TARGET = true
......@@ -113,6 +118,7 @@ DOCKER_COMPOSE_ARGS := DISPLAY=$(DISPLAY) \
TANGO_HOST=$(TANGO_HOST) \
MYSQL_HOST=$(MYSQL_HOST) \
HOSTNAME=$(HOSTNAME) \
LOG_HOSTNAME=$(LOG_HOSTNAME) \
NETWORK_MODE=$(NETWORK_MODE) \
XAUTHORITY_MOUNT=$(XAUTHORITY_MOUNT) \
CONTAINER_NAME_PREFIX=$(CONTAINER_NAME_PREFIX) \
......
......@@ -20,7 +20,7 @@ services:
logging:
driver: syslog
options:
syslog-address: udp://${HOSTNAME}:1514
syslog-address: udp://${LOG_HOSTNAME}:1514
syslog-format: rfc3164
tag: "{{.Name}}"
restart: unless-stopped
......@@ -45,7 +45,7 @@ services:
logging:
driver: syslog
options:
syslog-address: udp://${HOSTNAME}:1514
syslog-address: udp://${LOG_HOSTNAME}:1514
syslog-format: rfc3164
tag: "{{.Name}}"
restart: unless-stopped
......@@ -70,7 +70,7 @@ services:
logging:
driver: syslog
options:
syslog-address: udp://${HOSTNAME}:1514
syslog-address: udp://${LOG_HOSTNAME}:1514
syslog-format: rfc3164
tag: "{{.Name}}"
......@@ -94,7 +94,7 @@ services:
logging:
driver: syslog
options:
syslog-address: udp://${HOSTNAME}:1514
syslog-address: udp://${LOG_HOSTNAME}:1514
syslog-format: rfc3164
tag: "{{.Name}}"
restart: unless-stopped
......
......@@ -26,7 +26,7 @@ services:
logging:
driver: syslog
options:
syslog-address: udp://${HOSTNAME}:1514
syslog-address: udp://${LOG_HOSTNAME}:1514
syslog-format: rfc3164
tag: "{{.Name}}"
restart: unless-stopped
......@@ -19,7 +19,7 @@ services:
logging:
driver: syslog
options:
syslog-address: udp://${HOSTNAME}:1514
syslog-address: udp://${LOG_HOSTNAME}:1514
syslog-format: rfc3164
tag: "{{.Name}}"
restart: unless-stopped
......@@ -36,7 +36,7 @@ services:
logging:
driver: syslog
options:
syslog-address: udp://${HOSTNAME}:1514
syslog-address: udp://${LOG_HOSTNAME}:1514
syslog-format: rfc3164
tag: "{{.Name}}"
restart: unless-stopped
......@@ -31,7 +31,7 @@ services:
logging:
driver: syslog
options:
syslog-address: udp://${HOSTNAME}:1514
syslog-address: udp://${LOG_HOSTNAME}:1514
syslog-format: rfc3164
tag: "{{.Name}}"
restart: unless-stopped
......@@ -64,7 +64,7 @@ services:
logging:
driver: syslog
options:
syslog-address: udp://${HOSTNAME}:1514
syslog-address: udp://${LOG_HOSTNAME}:1514
syslog-format: rfc3164
tag: "{{.Name}}"
restart: unless-stopped
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment