From 5cd633efff93251fba5a4b4f43eb76c6d4a0d720 Mon Sep 17 00:00:00 2001 From: Riaan Nolan Date: Thu, 11 Aug 2022 22:54:07 +0000 Subject: [PATCH] trun of systemd-resolve, install dnsmasq, config dns forwarder to consul, set nameserver in Dockerfile for Nomad waypoint deployments, working nice, w00t w00t --- hashicorp/consul.sh | 51 ++++++++++--------- hashicorp/waypoint.sh | 2 +- .../nomad-trex-nodejs/Dockerfile | 2 + 3 files changed, 30 insertions(+), 25 deletions(-) diff --git a/hashicorp/consul.sh b/hashicorp/consul.sh index bef9588..fe36830 100644 --- a/hashicorp/consul.sh +++ b/hashicorp/consul.sh @@ -5,9 +5,9 @@ function consul-install() { arch=$(lscpu | grep "Architecture" | awk '{print $NF}') if [[ $arch == x86_64* ]]; then - ARCH="amd64" + ARCH="amd64" elif [[ $arch == aarch64 ]]; then - ARCH="arm64" + ARCH="arm64" fi echo -e '\e[38;5;198m'"CPU is $ARCH" @@ -123,33 +123,36 @@ EOF consul kv put fabio/config/countdashtest1 "route add countdashtest fabio.service.consul:9999/countdashtest http://10.9.99.10:9022/ opts \"strip=/countdashtest\"" consul kv put fabio/config/docsify "route add docsify docsify.service.consul:9999/ http://10.9.99.10:3333" - echo -e '\e[38;5;198m'"++++ Adding Consul for DNS lookups" - # https://learn.hashicorp.com/tutorials/consul/dns-forwarding#systemd-resolved-setup - mkdir -p /etc/systemd/resolved.conf.d/ - cat < /etc/resolv.conf + EXPOSE 6001 CMD [ "node", "index.js" ]