Migrate Nextcloud to Stacks
This commit is contained in:
parent
b327b8c6f1
commit
a8a9705b82
@ -1 +0,0 @@
|
||||
DOCKER_DATA=/mnt/iscsi/barbarian/nextcloud
|
@ -1,93 +0,0 @@
|
||||
# Config Snippets for `default.conf` Nginx config
|
||||
The Nginx server inside the container manages many aspects of connectivity for the Nextcloud server.
|
||||
The `default.conf` here is for reference only.
|
||||
The effective `default.conf` file is located at: `/config/nginx/site-confs/default.conf`.
|
||||
|
||||
|
||||
## Increase Upload Limits
|
||||
In the `server {` block:
|
||||
```conf
|
||||
client_max_body_size 50G;
|
||||
client_body_timeout 600s;
|
||||
```
|
||||
|
||||
# Config Snippets for `php-local.ini` PHP config override
|
||||
It seems the preferred mode for modifying Nextcloud's PHP config is via `php.ini`, located at `/config/php/php-local.ini`.
|
||||
|
||||
## Increase Upload Limits
|
||||
```ini
|
||||
upload_max_filesize = 8192M
|
||||
post_max_size = 8192M
|
||||
max_execution_time = 600
|
||||
```
|
||||
|
||||
## Increase PHP Memory Limit
|
||||
```ini
|
||||
memory_limit = 4G
|
||||
```
|
||||
|
||||
# Config Snippets for `config.php` PHP config
|
||||
The Nextcloud server is configured via `config.php` at `$DOCKER_DATA/config/www/nextcloud/config/`. We make changes to this file manually, and then restart or recreate the container to apply the changes.
|
||||
|
||||
All configuration parameters are contained in the `<?php $CONFIG=array (` block.
|
||||
|
||||
## Mail via Gmail
|
||||
```php
|
||||
'mail_smtpmode' => 'smtp',
|
||||
'mail_smtpsecure' => 'ssl',
|
||||
'mail_sendmailmode' => 'smtp',
|
||||
'mail_from_address' => 'noreply',
|
||||
'mail_domain' => 'jafner.net',
|
||||
'mail_smtpauthtype' => 'LOGIN',
|
||||
'mail_smtpauth' => 1,
|
||||
'mail_smtphost' => 'smtp.gmail.com',
|
||||
'mail_smtpport' => '465',
|
||||
'mail_smtpname' => 'noreply@jafner.net',
|
||||
'mail_smtppassword' => '${REPLACEME_SMTP_PASSWORD}',
|
||||
```
|
||||
|
||||
## Trusted Proxies
|
||||
```php
|
||||
'trusted_proxies' =>
|
||||
array (
|
||||
0 => '${REPLACEME_IP_OF_TRAEFIK_CONTAINER}',
|
||||
),
|
||||
```
|
||||
|
||||
## Transactional File Locking with Redis
|
||||
```php
|
||||
'filelocking.enabled' => true,
|
||||
'memcache.locking' => '\OC\Memcache\Redis',
|
||||
'redis' => array(
|
||||
'host' => 'redis',
|
||||
'port' => 6379,
|
||||
'timeout' => 0.0,
|
||||
'password' => '', // Optional, if not defined no password will be used.
|
||||
),
|
||||
```
|
||||
|
||||
## HEIC Image Previews
|
||||
```php
|
||||
'enable_previews' => true,
|
||||
'enabledPreviewProviders' =>
|
||||
array (
|
||||
'OC\Preview\PNG',
|
||||
'OC\Preview\JPEG',
|
||||
'OC\Preview\GIF',
|
||||
'OC\Preview\BMP',
|
||||
'OC\Preview\XBitmap',
|
||||
'OC\Preview\MP3',
|
||||
'OC\Preview\TXT',
|
||||
'OC\Preview\MarkDown',
|
||||
'OC\Preview\OpenDocument',
|
||||
'OC\Preview\Krita',
|
||||
'OC\Preview\HEIC',
|
||||
),
|
||||
```
|
||||
|
||||
## Increase Upload Limits
|
||||
```php
|
||||
upload_max_filesize = 2048M
|
||||
post_max_size = 2048M
|
||||
max_execution_time = 200
|
||||
```
|
@ -1,5 +0,0 @@
|
||||
PUID=1000
|
||||
PGID=1000
|
||||
TZ=America/Los_Angeles
|
||||
MYSQL_DATABASE=nextcloud
|
||||
MYSQL_USER=ncuser
|
@ -1,3 +0,0 @@
|
||||
PUID=1000
|
||||
PGID=1000
|
||||
TZ=Americal/Los_Angeles
|
1
homelab/stacks/nextcloud/.env
Normal file
1
homelab/stacks/nextcloud/.env
Normal file
@ -0,0 +1 @@
|
||||
DOCKER_DATA=/mnt/iscsi/barbarian/nextcloud
|
@ -1,3 +1,99 @@
|
||||
# Config Snippets for `default.conf` Nginx config
|
||||
The Nginx server inside the container manages many aspects of connectivity for the Nextcloud server.
|
||||
The `default.conf` here is for reference only.
|
||||
The effective `default.conf` file is located at: `/config/nginx/site-confs/default.conf`.
|
||||
|
||||
|
||||
## Increase Upload Limits
|
||||
In the `server {` block:
|
||||
```conf
|
||||
client_max_body_size 50G;
|
||||
client_body_timeout 600s;
|
||||
```
|
||||
|
||||
# Config Snippets for `php-local.ini` PHP config override
|
||||
It seems the preferred mode for modifying Nextcloud's PHP config is via `php.ini`, located at `/config/php/php-local.ini`.
|
||||
|
||||
## Increase Upload Limits
|
||||
```ini
|
||||
upload_max_filesize = 8192M
|
||||
post_max_size = 8192M
|
||||
max_execution_time = 600
|
||||
```
|
||||
|
||||
## Increase PHP Memory Limit
|
||||
```ini
|
||||
memory_limit = 4G
|
||||
```
|
||||
|
||||
# Config Snippets for `config.php` PHP config
|
||||
The Nextcloud server is configured via `config.php` at `$DOCKER_DATA/config/www/nextcloud/config/`. We make changes to this file manually, and then restart or recreate the container to apply the changes.
|
||||
|
||||
All configuration parameters are contained in the `<?php $CONFIG=array (` block.
|
||||
|
||||
## Mail via Gmail
|
||||
```php
|
||||
'mail_smtpmode' => 'smtp',
|
||||
'mail_smtpsecure' => 'ssl',
|
||||
'mail_sendmailmode' => 'smtp',
|
||||
'mail_from_address' => 'noreply',
|
||||
'mail_domain' => 'jafner.net',
|
||||
'mail_smtpauthtype' => 'LOGIN',
|
||||
'mail_smtpauth' => 1,
|
||||
'mail_smtphost' => 'smtp.gmail.com',
|
||||
'mail_smtpport' => '465',
|
||||
'mail_smtpname' => 'noreply@jafner.net',
|
||||
'mail_smtppassword' => '${REPLACEME_SMTP_PASSWORD}',
|
||||
```
|
||||
|
||||
## Trusted Proxies
|
||||
```php
|
||||
'trusted_proxies' =>
|
||||
array (
|
||||
0 => '${REPLACEME_IP_OF_TRAEFIK_CONTAINER}',
|
||||
),
|
||||
```
|
||||
|
||||
## Transactional File Locking with Redis
|
||||
```php
|
||||
'filelocking.enabled' => true,
|
||||
'memcache.locking' => '\OC\Memcache\Redis',
|
||||
'redis' => array(
|
||||
'host' => 'redis',
|
||||
'port' => 6379,
|
||||
'timeout' => 0.0,
|
||||
'password' => '', // Optional, if not defined no password will be used.
|
||||
),
|
||||
```
|
||||
|
||||
## HEIC Image Previews
|
||||
```php
|
||||
'enable_previews' => true,
|
||||
'enabledPreviewProviders' =>
|
||||
array (
|
||||
'OC\Preview\PNG',
|
||||
'OC\Preview\JPEG',
|
||||
'OC\Preview\GIF',
|
||||
'OC\Preview\BMP',
|
||||
'OC\Preview\XBitmap',
|
||||
'OC\Preview\MP3',
|
||||
'OC\Preview\TXT',
|
||||
'OC\Preview\MarkDown',
|
||||
'OC\Preview\OpenDocument',
|
||||
'OC\Preview\Krita',
|
||||
'OC\Preview\HEIC',
|
||||
),
|
||||
```
|
||||
|
||||
## Increase Upload Limits
|
||||
```php
|
||||
upload_max_filesize = 2048M
|
||||
post_max_size = 2048M
|
||||
max_execution_time = 200
|
||||
```
|
||||
|
||||
# Example default.conf
|
||||
```
|
||||
## Version 2022/08/20 - Changelog: https://github.com/linuxserver/docker-nextcloud/commits/master/root/defaults/nginx/site-confs/default.conf.sample
|
||||
|
||||
# Set the `immutable` cache control options only for assets with a cache busting `v` argument
|
||||
@ -162,4 +258,5 @@ server {
|
||||
location ~ /\.ht {
|
||||
deny all;
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
@ -2,9 +2,10 @@ services:
|
||||
nextcloud:
|
||||
image: lscr.io/linuxserver/nextcloud:latest
|
||||
container_name: nextcloud_nextcloud
|
||||
env_file:
|
||||
- path: ./nextcloud.env
|
||||
required: true
|
||||
environment:
|
||||
PUID: "1000"
|
||||
PGID: "1000"
|
||||
TZ: "America/Los_Angeles"
|
||||
depends_on:
|
||||
- mariadb
|
||||
labels:
|
||||
@ -25,11 +26,15 @@ services:
|
||||
container_name: nextcloud_mariadb
|
||||
networks:
|
||||
- nextcloud
|
||||
environment:
|
||||
PUID: "1000"
|
||||
PGID: "1000"
|
||||
TZ: "America/Los_Angeles"
|
||||
MYSQL_DATABASE: "nextcloud"
|
||||
MYSQL_USER: "ncuser"
|
||||
env_file:
|
||||
- path: ./mariadb.env
|
||||
- path: ./mariadb.secrets
|
||||
required: true
|
||||
- path: ./mariadb_secrets
|
||||
required: false
|
||||
volumes:
|
||||
- $DOCKER_DATA/mariadb:/config
|
||||
|
||||
@ -44,4 +49,4 @@ services:
|
||||
networks:
|
||||
web:
|
||||
external: true
|
||||
nextcloud:
|
||||
nextcloud:
|
58
homelab/stacks/nextcloud/mariadb.secrets
Normal file
58
homelab/stacks/nextcloud/mariadb.secrets
Normal file
@ -0,0 +1,58 @@
|
||||
{
|
||||
"data": "ENC[AES256_GCM,data:qlKIsdKAcFOE6Ux+3huvAsXCArGbsNI7BuRLp/xLbQXo58yNvme0g57fbr0orENArB4kSEJN2mqbxuwal241vcm9jv1jY8cBJukhz6aqaMp5B+MDw5KbGPuZdVsWzf6zT/XgjqXyiacfhYudqkhJ258LQLGOL9WVoDIizyt/x3KViEihT9gbrVw/3qrF0aso734xHjl1ocRBFSbZJcITkdGuc5NwHGtoGg==,iv:zxKkgcxef4qfnbnpA+wfBxIJ3BUzxdI0+YjRtx+X/0Q=,tag:7a+bxm1XkWq7G6eSHbTbBQ==,type:str]",
|
||||
"sops": {
|
||||
"shamir_threshold": 2,
|
||||
"key_groups": [
|
||||
{
|
||||
"hc_vault": null,
|
||||
"age": [
|
||||
{
|
||||
"recipient": "age1zswcq6t5wl8spr3g2wpxhxukjklngcav0vw8py0jnfkqd2jm2ypq53ga00",
|
||||
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBpZktMRkhiL214c0pxQ0tE\nbDA0UVBaMHAwTVZpampZUURKcHBLUi9BNmkwCmxvd3RMYWNkdHhxaXR3NnZUaDlR\nN0hFcDdYNFRvZ2tzL3JJdjM3dDVJV3MKLS0tICtQU3Nra1lHQlhTV2p3VDQ0SExm\neVFuOXRhZGpCRU5VbHZSZC9Vejk1M0kKLr/K2PcSGZoVXxfVNJBTQMTw/EHU0VSl\nU1SlxCvd9LXe04yZPEgzoPY6+Ijh35pQI9YtWsjFHtUnfl9lsI4aJks=\n-----END AGE ENCRYPTED FILE-----\n"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"hc_vault": null,
|
||||
"age": [
|
||||
{
|
||||
"recipient": "age1zswcq6t5wl8spr3g2wpxhxukjklngcav0vw8py0jnfkqd2jm2ypq53ga00",
|
||||
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBBTmJKdklkR1dxSVdPOSsw\nYVdHNjk5bWFPSWVFTG5EVmt5RE5aZ09OZVg0CmRPV0VaWDBnQU1iamkyUGRlTFN2\nOWhCdS81VWtacGxCZXBiU3NQaHZLRjQKLS0tIGZIRGlYWkJ4MWtmSmF0WjVsL3FE\nZUtUUXp0QS9yTnllNDZxOVZhbXB6VVkKOZPwIefjMlgr3OWe48mjqSsUGo4z5b9P\nhd0kQTjsUfnoO06PXZpT3B0KTfMTdMl4NxH1FUCyeonM6cJ5dQhrGxI=\n-----END AGE ENCRYPTED FILE-----\n"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"hc_vault": null,
|
||||
"age": [
|
||||
{
|
||||
"recipient": "age193t908fjxl8ekl77p5xqnpj4xmw3y0khvyzlrw22hdzjduk6l53q05spq3",
|
||||
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSByYnlUbjRpenpOVTl0SEhp\nMkJaWTNQZnlheExzZWV0VFVXbE14Q1hvZzJvCjZqczg2NTlWYVhseXY5cVlGRkZs\naDlQVkNwSjBFZUVHZUZmTzdMQ0JKWnMKLS0tIEZGaG5Pak0zdmVOTGVEZXNnMitQ\nUU5WVXdzUnp2aEdHL3pXMTJncThLcjgKSolCrR5D83G/zmZW9Whx5tJ8RnEwWjD4\n+4Ur4PPl4iNO3hdAb6OJHhKmPCvbzXd2tedQ3alPxEH9ayltgczf8Tk=\n-----END AGE ENCRYPTED FILE-----\n"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"hc_vault": null,
|
||||
"age": [
|
||||
{
|
||||
"recipient": "age13prhyye2jy3ysa6ltnjgkrqtxrxgs0035d86jyn4ltgk3wxtqgrqgav855",
|
||||
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBIZXBENm5UVEJkSyszSGw2\nSUtNZk9oc2M5TzhiS2YvOTg3VXl5R1FjTFJRCmdLK1NxeUxMbzBkdHVLYnRQUzAv\nL3J2blpSNUFoek1QTkE3dFRHd3RXdHMKLS0tIDhwelJkTGpTSVUxU1JPa0hOeDRD\nTVlrUDdRekw2bUZlbnZmcU1aUlUyQ3MKg+JK86djvqN8BsgaeJHlmf+BFnEdp0la\nYHf10mpTTy8t6VTxIQ8x3EQdAKhLXNkoWgCN9MW1FVZX8cfMn4r+Bqg=\n-----END AGE ENCRYPTED FILE-----\n"
|
||||
},
|
||||
{
|
||||
"recipient": "age1n20krynrj75jqfy2muvhrygvzd4ee8ngamljqavsrk033zwx0ses2tdtfe",
|
||||
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBMRGZOOUpsZGZyVFpCWXIy\nQTJYMm5TR2dVNW1heXVGTHB3ZU13UW05eEdzCnZUSVRGRkNhUUFtM2VhVWlTMTJN\nYUd4UkdrdGZiSEJVY0wxREZYZWFCWlUKLS0tIHFMYkxHVlNvbVh1ZVlGRFhDQjd6\nendPei9Ed0pDQ013Ry80OEdTb1FTcHcKoSKqAxNM7VXIwhOlIBCKR6bfK5FYjXI4\nKDU4NR2P8/ZQMt829UshLEvDeMv1W8vaZbvO62DzbGHPactDfaI+pTI=\n-----END AGE ENCRYPTED FILE-----\n"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"kms": null,
|
||||
"gcp_kms": null,
|
||||
"azure_kv": null,
|
||||
"hc_vault": null,
|
||||
"age": null,
|
||||
"lastmodified": "2024-10-08T18:52:45Z",
|
||||
"mac": "ENC[AES256_GCM,data:e6ECTJNd/T/DA1+w91DTqpdekj6NodS4xfpS6L+pv7Fen0XSDx3zsrSfLQZyv5VOvjMCLBBZay90YrP+FbN5u57pI5MljYg7sHuIQitThkmFLbhfnBo0pwqptDsYVBZaE+jm5eGbGrPTinbn1uPmaPxRYjmsS9q/BRNLr9pBuqk=,iv:LtaUbk/CAUSdtd8rZMVwQvoSStazsvagNB/FV3hnRxk=,tag:bAEq+SRYf96biRFK63XdEA==,type:str]",
|
||||
"pgp": null,
|
||||
"unencrypted_suffix": "_unencrypted",
|
||||
"version": "3.9.0"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user