Commit 4c8d6c0f authored by nimrod's avatar nimrod
Browse files

Set the hostname.

parent 2a11f9f2
Loading
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -47,13 +47,19 @@ run-ns4:
  extends: .compose-run
  stage: deploy
  tags: [ns4.shore.co.il]
  variables:
    HOSTNAME: ns4

run-host01:
  extends: .compose-run
  stage: deploy
  tags: [host01.shore.co.il]
  variables:
    HOSTNAME: host01

run-kodi:
  extends: .compose-run
  stage: deploy
  tags: [kodi.shore.co.il]
  variables:
    HOSTNAME: kodi
+4 −4
Original line number Diff line number Diff line
@@ -4,11 +4,12 @@ services:
  filebeat:
    build:
      context: filebeat
    domainname: &domainname "${HOSTNAME}.shore.co.il"
    hostname: &hostname "${HOSTNAME}"
    image: registry.shore.co.il/filebeat
    restart: always
    user: root
    volumes:
      - /etc/hostname:/etc/hostname:ro
      - filebeat:/usr/share/filebeat/data/
      - /var/lib/docker/containers:/var/lib/docker/containers:ro
      - /var/run/docker.sock:/var/run/docker.sock:ro
@@ -16,11 +17,12 @@ services:
  journalbeat:
    build:
      context: journalbeat
    domainname: *domainname
    hostname: *hostname
    image: registry.shore.co.il/journalbeat
    restart: always
    user: root
    volumes:
      - /etc/hostname:/etc/hostname:ro
      - journalbeat:/usr/share/journalbeat/data/
      - /var/log/journal:/var/log/journal
      - /etc/machine-id:/etc/machine-id:ro
@@ -34,7 +36,6 @@ services:
    restart: always
    user: root
    volumes:
      - /etc/hostname:/etc/hostname:ro
      - metricbeat:/usr/share/metricbeat/data/
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - /sys/fs/cgroup:/hostfs/sys/fs/cgroup:ro
@@ -54,7 +55,6 @@ services:
    network_mode: host
    restart: always
    volumes:
      - /etc/hostname:/etc/hostname:ro
      - packetbeat:/usr/share/packetbeat/data/

volumes: