Add nextcloud configuration
This commit is contained in:
parent
5b5f922354
commit
fe11b58a8a
|
@ -13,6 +13,7 @@
|
|||
# docker-containers set here.
|
||||
./services/nginx.nix
|
||||
./services/gitlab.nix
|
||||
./services/nextcloud.nix
|
||||
];
|
||||
|
||||
networking = {
|
||||
|
|
18
etc/nixos/services/configs/nginx-nextcloud.conf
Normal file
18
etc/nixos/services/configs/nginx-nextcloud.conf
Normal file
|
@ -0,0 +1,18 @@
|
|||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
root /var/www/html;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
client_max_body_size 16G;
|
||||
location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+|core/templates/40[34]).php(?:$|/) {
|
||||
fastcgi_split_path_info ^(.+.php)(/.*)$;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
fastcgi_pass nextcloud:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_intercept_errors on;
|
||||
include fastcgi_params;
|
||||
}
|
||||
}
|
62
etc/nixos/services/nextcloud.nix
Normal file
62
etc/nixos/services/nextcloud.nix
Normal file
|
@ -0,0 +1,62 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
networked-docker-containers = {
|
||||
nextcloud = {
|
||||
image = "nextcloud:fpm-alpine";
|
||||
dependsOn = ["docker-nextcloud-postgres.service"];
|
||||
volumes = [
|
||||
"apps:/var/www/html/custom_apps"
|
||||
"config:/var/www/html/config"
|
||||
"data:/var/www/html/data"
|
||||
];
|
||||
environment = {
|
||||
POSTGRES_DB = "nextcloud";
|
||||
POSTGRES_USER = "nextcloud";
|
||||
POSTGRES_HOST = "nextcloud-postgres";
|
||||
POSTGRES_PASSWORD = "rI7t7Nek1yGA9ucrRc7Uhy0jcjwPjnXa8me4o8tJON8=";
|
||||
};
|
||||
networks = [
|
||||
"nextcloud"
|
||||
];
|
||||
extraDockerOptions = [
|
||||
"--domainname=nextcloud.tlater.net"
|
||||
];
|
||||
};
|
||||
|
||||
nextcloud-nginx = {
|
||||
image = "nginx:alpine";
|
||||
dependsOn = ["docker-nextcloud.service"];
|
||||
environment = {
|
||||
LETSENCRYPT_HOST = "nextcloud.tlater.net";
|
||||
VIRTUAL_HOST = "nextcloud.tlater.net";
|
||||
};
|
||||
volumes = [
|
||||
"${./configs/nginx-nextcloud.conf}:/etc/nginx/conf.d/default.conf:ro"
|
||||
];
|
||||
networks = [
|
||||
"webproxy"
|
||||
"nextcloud"
|
||||
];
|
||||
extraDockerOptions = [
|
||||
"--volumes-from"
|
||||
"nextcloud"
|
||||
];
|
||||
};
|
||||
|
||||
nextcloud-postgres = {
|
||||
image = "postgres:alpine";
|
||||
environment = {
|
||||
POSTGRES_DB = "nextcloud";
|
||||
POSTGRES_USER = "nextcloud";
|
||||
POSTGRES_PASSWORD = "rI7t7Nek1yGA9ucrRc7Uhy0jcjwPjnXa8me4o8tJON8=";
|
||||
};
|
||||
volumes = [
|
||||
"nextcloud-db-data:/var/lib/postgresql/data"
|
||||
];
|
||||
networks = [
|
||||
"nextcloud"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue