Add nextcloud service
This commit is contained in:
parent
4689a153b9
commit
98cf95a922
3 changed files with 230 additions and 2 deletions
configuration/services
52
configuration/services/nextcloud.nix
Normal file
52
configuration/services/nextcloud.nix
Normal file
|
@ -0,0 +1,52 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
virtualisation.pods.nextcloud = {
|
||||
hostname = "nextcloud.tlater.net";
|
||||
publish = [ "3001:80" ];
|
||||
|
||||
containers = {
|
||||
nextcloud = {
|
||||
image = "nextcloud:fpm-alpine";
|
||||
dependsOn = [ "postgres" ];
|
||||
volumes = [
|
||||
"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 = "nextcloud-postgres";
|
||||
POSTGRES_PASSWORD = "rI7t7Nek1yGA9ucrRc7Uhy0jcjwPjnXa8me4o8tJON8=";
|
||||
OVERWRITEPROTOCOL = "https";
|
||||
};
|
||||
};
|
||||
|
||||
cron = {
|
||||
image = "nextcloud:fpm-alpine";
|
||||
entrypoint = "/cron.sh";
|
||||
dependsOn = [ "postgres" "nextcloud" ];
|
||||
extraOptions = [ "--volumes-from=nextcloud-nextcloud" ];
|
||||
};
|
||||
|
||||
nginx = {
|
||||
image = "nginx:alpine";
|
||||
dependsOn = [ "nextcloud" ];
|
||||
volumes =
|
||||
[ "${./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";
|
||||
POSTGRES_PASSWORD = "rI7t7Nek1yGA9ucrRc7Uhy0jcjwPjnXa8me4o8tJON8=";
|
||||
};
|
||||
volumes = [ "nextcloud-db-data-new:/var/lib/postgresql/data" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue