2024-03-06 11:16:14 +01:00
|
|
|
{pkgs, ...}: {
|
|
|
|
project.name = "nextcloud";
|
|
|
|
|
|
|
|
networks.dmz = {
|
|
|
|
name = "dmz";
|
|
|
|
external = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
networks.transport = {};
|
|
|
|
|
|
|
|
services = {
|
|
|
|
nextcloud.service = {
|
|
|
|
image = "nextcloud:latest";
|
|
|
|
container_name = "nextcloud";
|
|
|
|
useHostStore = true;
|
|
|
|
labels = {
|
|
|
|
"traefik.enable" = "true";
|
|
|
|
"traefik.http.routers.nextcloud.entrypoints" = "websecure";
|
|
|
|
"traefik.http.routers.nextcloud.rule" = "Host(`nextcloud.ghoscht.com`)";
|
|
|
|
"traefik.docker.network" = "dmz";
|
|
|
|
"traefik.http.routers.nextcloud.tls" = "true";
|
|
|
|
"traefik.http.routers.nextcloud.tls.certresolver" = "letsencrypt";
|
|
|
|
};
|
|
|
|
volumes = [
|
2024-03-17 15:18:23 +01:00
|
|
|
"/drives/hdd/docker/nextcloud/nextcloud_data:/var/www/html"
|
2024-03-06 11:16:14 +01:00
|
|
|
];
|
2024-03-17 15:18:23 +01:00
|
|
|
hostname = "nextcloud.ghoscht.com";
|
|
|
|
dns = ["1.1.1.1"];
|
2024-03-06 11:16:14 +01:00
|
|
|
restart = "unless-stopped";
|
|
|
|
networks = [
|
|
|
|
"dmz"
|
|
|
|
"transport"
|
|
|
|
];
|
|
|
|
};
|
2024-03-17 15:18:23 +01:00
|
|
|
nextcloud-db.service = {
|
|
|
|
image = "mariadb:11.4.1-rc-jammy";
|
2024-03-06 11:16:14 +01:00
|
|
|
env_file = [
|
|
|
|
"/home/ghoscht/.docker/nextcloud/nextcloud.env"
|
|
|
|
];
|
2024-03-17 15:18:23 +01:00
|
|
|
volumes = ["/drives/hdd/docker/nextcloud/nextcloud_db:/var/lib/mysql"];
|
2024-03-06 11:16:14 +01:00
|
|
|
restart = "unless-stopped";
|
|
|
|
command = "--transaction-isolation=READ-COMMITTED --binlog-format=ROW";
|
|
|
|
networks = [
|
|
|
|
"transport"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|