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.
56 lines
1.5 KiB
Nix
56 lines
1.5 KiB
Nix
{ config, ... }:
|
|
|
|
{
|
|
virtualisation.pods.nextcloud = {
|
|
hostname = "nextcloud.tlater.net";
|
|
publish = [ "3001:80" ];
|
|
network = "slirp4netns";
|
|
|
|
containers = {
|
|
nextcloud = {
|
|
image = "nextcloud:fpm-alpine";
|
|
dependsOn = [ "postgres" ];
|
|
volumes = [
|
|
"nextcloud-root:/var/www/html"
|
|
"nextcloud-apps:/var/www/html/custom_apps"
|
|
"nextcloud-config:/var/www/html/config"
|
|
"nextcloud-data:/var/www/html/data"
|
|
];
|
|
environment = {
|
|
POSTGRES_DB = "nextcloud";
|
|
POSTGRES_USER = "nextcloud";
|
|
POSTGRES_HOST = "localhost";
|
|
OVERWRITEPROTOCOL = "https";
|
|
TRUSTED_PROXIES = "127.0.0.1";
|
|
};
|
|
};
|
|
|
|
cron = {
|
|
image = "nextcloud:fpm-alpine";
|
|
entrypoint = "/cron.sh";
|
|
dependsOn = [ "postgres" "nextcloud" ];
|
|
extraOptions = [ "--volumes-from=nextcloud-nextcloud" ];
|
|
};
|
|
|
|
nginx = {
|
|
image = "nginx:alpine";
|
|
dependsOn = [ "nextcloud" ];
|
|
volumes = [
|
|
"nextcloud-root:/var/www/html:ro"
|
|
"${./configs/nginx-nextcloud.conf}:/etc/nginx/nginx.conf:ro"
|
|
];
|
|
extraOptions = [ "--volumes-from=nextcloud-nextcloud" ];
|
|
};
|
|
|
|
postgres = {
|
|
image = "postgres:alpine";
|
|
environment = {
|
|
POSTGRES_DB = "nextcloud";
|
|
POSTGRES_USER = "nextcloud";
|
|
};
|
|
volumes = [ "nextcloud-db-data:/var/lib/postgresql/data" ];
|
|
};
|
|
};
|
|
};
|
|
}
|