From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1689262142; bh=zfHZAVMwe2g8pV8fbNp7pg5t7CWWlpHJhEU2zL453c0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=R9yQhpqBDVs3FMCVu4U0e55H3zoSmy84TVRhiBBl8KaldaJO0EScE8QG8wc/mgecn CGm7T90rb6FiNxIO4RBsAAuhgI1UWNev9u/Ld+/3spId/uMjF8t+Py0vm6mL3AmkHi OpBrRgfGSct5SMnraCFzRNBjxQXCevgbWe8aVJdYZxgOxMl8rE/gbRHs8a5dFrbIZC fi3pqlkcxJDiuqWHvFpAqH8Wl9UpTkeovl/ccdC51MBterEYcJNW3cY7ri+Z5iHS8n PgfuD4HlMTXCrcF1/1o360EOAal/CG12hj4LLqF3EViP5OmTrkqXJKnRtPvvMTBzYe 8AbKQCjLD6UFA== Received: from server-haj002.. (server-haj002.gnuweeb.org [45.83.104.102]) by gnuweeb.org (Postfix) with ESMTPSA id 6E31524A961; Thu, 13 Jul 2023 22:29:01 +0700 (WIB) From: Alviro Iskandar Setiawan To: Ammar Faizi , Michael William Jonathan Cc: Alviro Iskandar Setiawan , GNU/Weeb Mailing List Subject: [PATCH server-haj002 v1 3/6] mastodon: Fix DNS resolution error Date: Thu, 13 Jul 2023 17:28:47 +0200 Message-Id: <20230713152850.5565-4-alviro.iskandar@gnuweeb.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230713152850.5565-1-alviro.iskandar@gnuweeb.org> References: <20230713152850.5565-1-alviro.iskandar@gnuweeb.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: The default DNS system is not properly configured in this environment and it leads to DNS resolution error. Provide custom resolv.conf file and hosts file to satisfy the need of mastodon container. The custom resolv.conf script will use the host IP address as the DNS server. Therefore, the host must provide a working DNS server. It can simply be done by adding these two lines to /etc/systemd/resolved.conf DNSStubListenerExtra=0.0.0.0:53 DNSStubListenerExtra=[::]:53 Signed-off-by: Alviro Iskandar Setiawan --- mastodon/docker-compose.example.yml | 2 ++ mastodon/hosts | 8 ++++++++ mastodon/resolv.conf | 3 +++ 3 files changed, 13 insertions(+) create mode 100644 mastodon/hosts create mode 100644 mastodon/resolv.conf diff --git a/mastodon/docker-compose.example.yml b/mastodon/docker-compose.example.yml index e695b0a..769800f 100644 --- a/mastodon/docker-compose.example.yml +++ b/mastodon/docker-compose.example.yml @@ -94,3 +94,5 @@ services: - DB_POOL=5 #optional volumes: - /opt/mastodon/mastodon/config:/config + - ./resolv.conf:/etc/resolv.conf + - ./hosts:/etc/hosts diff --git a/mastodon/hosts b/mastodon/hosts new file mode 100644 index 0000000..23c9d56 --- /dev/null +++ b/mastodon/hosts @@ -0,0 +1,8 @@ +127.0.0.1 localhost +::1 localhost ip6-localhost ip6-loopback +fe00::0 ip6-localnet +ff00::0 ip6-mcastprefix +ff02::1 ip6-allnodes +ff02::2 ip6-allrouters +10.4.4.2 social social.gnuweeb.org +51.81.211.47 mail1.gnuweeb.org diff --git a/mastodon/resolv.conf b/mastodon/resolv.conf new file mode 100644 index 0000000..2adb825 --- /dev/null +++ b/mastodon/resolv.conf @@ -0,0 +1,3 @@ +nameserver 10.4.4.1 +nameserver 8.8.8.8 +nameserver 8.8.4.4 -- Alviro Iskandar Setiawan