tlaternet-server/configuration/services/nextcloud.nix

56 lines
1.5 KiB
Nix
Raw Normal View History

2021-04-12 01:42:46 +01:00
{ config, ... }:
{
virtualisation.pods.nextcloud = {
hostname = "nextcloud.tlater.net";
publish = [ "3001:80" ];
network = "slirp4netns";
2021-04-12 01:42:46 +01:00
containers = {
nextcloud = {
image = "nextcloud:fpm-alpine";
dependsOn = [ "postgres" ];
volumes = [
"nextcloud-root:/var/www/html"
2021-04-12 01:42:46 +01:00
"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";
2021-04-12 01:42:46 +01:00
OVERWRITEPROTOCOL = "https";
TRUSTED_PROXIES = "127.0.0.1";
2021-04-12 01:42:46 +01:00
};
};
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"
];
2021-04-12 01:42:46 +01:00
extraOptions = [ "--volumes-from=nextcloud-nextcloud" ];
};
postgres = {
image = "postgres:alpine";
environment = {
POSTGRES_DB = "nextcloud";
POSTGRES_USER = "nextcloud";
};
2022-01-18 18:46:37 +00:00
volumes = [ "nextcloud-postgres-14:/var/lib/postgresql/data" ];
2021-04-12 01:42:46 +01:00
};
};
};
}