From b6f39969cc50293b6dce493ef3273bc0573939f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tristan=20Dani=C3=ABl=20Maat?= Date: Sat, 8 Jan 2022 00:27:01 +0000 Subject: [PATCH] Fix podman hostnames It seems that with the newest version of podman container names are no longer added as hostnames, meaning that any attempt to resolve hostnames with the current config will fail. `localhost` is probably more robust anyway, so we switch to that. The bug manifests as broken services because nextcloud/gitea cannot resolve their databases and nextcloud fails to resolve the php server. To fix this a running system, the gitea and nextcloud database configurations will need to be hand-edited, since those values are only set on initialization, and not updated when changed later. --- configuration/services/configs/nginx-nextcloud.conf | 2 +- configuration/services/gitea.nix | 2 +- configuration/services/nextcloud.nix | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configuration/services/configs/nginx-nextcloud.conf b/configuration/services/configs/nginx-nextcloud.conf index eec7bdb..7c6ad78 100644 --- a/configuration/services/configs/nginx-nextcloud.conf +++ b/configuration/services/configs/nginx-nextcloud.conf @@ -27,7 +27,7 @@ http { #gzip on; upstream php-handler { - server nextcloud-nextcloud:9000; + server localhost:9000; } server { diff --git a/configuration/services/gitea.nix b/configuration/services/gitea.nix index 2258566..221b976 100644 --- a/configuration/services/gitea.nix +++ b/configuration/services/gitea.nix @@ -24,7 +24,7 @@ environment = { DB_TYPE = "postgres"; - DB_HOST = "gitea-postgres:5432"; + DB_HOST = "localhost:5432"; DB_NAME = "gitea"; DB_USER = "gitea"; diff --git a/configuration/services/nextcloud.nix b/configuration/services/nextcloud.nix index d4a7fe5..7d94bcf 100644 --- a/configuration/services/nextcloud.nix +++ b/configuration/services/nextcloud.nix @@ -19,7 +19,7 @@ environment = { POSTGRES_DB = "nextcloud"; POSTGRES_USER = "nextcloud"; - POSTGRES_HOST = "nextcloud-postgres"; + POSTGRES_HOST = "localhost"; OVERWRITEPROTOCOL = "https"; TRUSTED_PROXIES = "127.0.0.1"; };