1

Add nextcloud service

This commit is contained in:
2023-11-12 18:32:04 +01:00
parent 636c98ff06
commit f34f350d23
2 changed files with 73 additions and 11 deletions

View File

@ -17,6 +17,7 @@
./services/gitea.nix
./services/gitea-runner.nix
./services/homepage.nix
./services/nextcloud.nix
./services/nginx-proxy-manager.nix
./services/pihole.nix
./services/portainer.nix

View File

@ -4,27 +4,88 @@
pkgs,
...
}: {
virtualisation.oci-containers.containers.netflix = {
image = "linuxserver/nextcloud:latest";
virtualisation.oci-containers.containers.nextcloud-db = {
image = "postgres:alpine";
autoStart = true;
dependsOn = [
# "pihole"
];
dependsOn = [];
ports = [
# "443:443"
# "5432:5432"
];
volumes = [
"nextcloud_config:/config"
"nextcloud_data:/data"
"nextcloud-db_data:/var/lib/postgresql/data"
];
environment = {
PUID = "1000";
PGID = "1000";
TZ = "Europe/Berlin";
POSTGRES_PASSWORD = "nextcloud";
POSTGRES_DB = "nextcloud";
POSTGRES_USER = "nextcloud";
};
extraOptions = [
"--net=behind-nginx"
];
};
virtualisation.oci-containers.containers.nextcloud-memcache = {
image = "redis:alpine";
autoStart = true;
dependsOn = [];
ports = [
# "6379:6379"
];
volumes = [
"nextcloud-memcache_data:/data"
];
environment = {};
extraOptions = [
"--net=behind-nginx"
];
};
virtualisation.oci-containers.containers.nextcloud = {
image = "nextcloud:apache";
autoStart = true;
dependsOn = [
"nextcloud-db"
"nextcloud-memcache"
];
ports = [
"8080:80"
];
volumes = [
"nextcloud_data:/var/www/html"
"/var/run/docker.sock:/var/run/docker.sock:ro"
];
environment = {
# Don't add PUID/PGID/TZ or sth like that!
# Proxy
APACHE_DISABLE_REWRITE_IP = "1";
TRUSTED_DOMAINS = "nextcloud.local.chriphost.de local.chriphost.de nextcloud.vps.chriphost.de vps.chriphost.de";
TRUSTED_PROXIES = "192.168.86.25 212.227.233.241";
OVERWRITEPROTOCOL = "https";
# DB
POSTGRES_HOST = "nextcloud-db";
POSTGRES_PASSWORD = "nextcloud";
POSTGRES_DB = "nextcloud";
POSTGRES_USER = "nextcloud";
# Memcache + Transactional Locking
REDIS_HOST = "nextcloud-memcache";
};
extraOptions = [