Deploys Nextcloud with an FPM-alpine image and Caddy sidecar for web serving. Integrates an external CloudNativePG cluster for PostgreSQL database. Utilizes an external Valkey instance for caching. Configures S3-compatible object storage for file data. Includes an initialization job to create admin and Valkey secrets. Sets up Ingress for external access with TLS via cert-manager.
59 lines
1.6 KiB
YAML
59 lines
1.6 KiB
YAML
apiVersion: v1
|
|
data:
|
|
Caddyfile: |
|
|
:80 {
|
|
root * /var/www/html
|
|
|
|
header {
|
|
Referrer-Policy "no-referrer"
|
|
X-Content-Type-Options "nosniff"
|
|
X-Frame-Options "SAMEORIGIN"
|
|
X-Permitted-Cross-Domain-Policies "none"
|
|
X-Robots-Tag "noindex, nofollow"
|
|
X-XSS-Protection "1; mode=block"
|
|
-X-Powered-By
|
|
}
|
|
|
|
redir /.well-known/carddav /remote.php/dav/ 301
|
|
redir /.well-known/caldav /remote.php/dav/ 301
|
|
redir /.well-known/* /index.php{uri} 301
|
|
|
|
@blocked path /build/* /tests/* /config/* /lib/* /3rdparty/* /templates/* /data/*
|
|
respond @blocked 404
|
|
|
|
@davclnt {
|
|
path /
|
|
header User-Agent DavClnt*
|
|
}
|
|
redir @davclnt /remote.php/webdav/ 302
|
|
|
|
redir /remote /remote.php{uri} 301
|
|
|
|
php_fastcgi 127.0.0.1:9000 {
|
|
env HTTPS on
|
|
env modHeadersAvailable true
|
|
env front_controller_active true
|
|
resolve_root_symlink
|
|
}
|
|
|
|
@static path *.css *.js *.mjs *.svg *.gif *.ico *.jpg *.png *.webp *.wasm *.tflite *.map *.ogg *.flac
|
|
header @static Cache-Control "max-age=15778463"
|
|
|
|
@fonts path *.otf *.woff *.woff2
|
|
header @fonts Cache-Control "max-age=604800"
|
|
|
|
encode gzip
|
|
|
|
file_server
|
|
|
|
request_body {
|
|
max_size 16GB
|
|
}
|
|
}
|
|
kind: ConfigMap
|
|
metadata:
|
|
annotations:
|
|
a8r.io/repository: ssh://git@git.tr1ceracop.de:222/gitea_admin/k8s-and-chill.git
|
|
name: nextcloud-caddy-config
|
|
namespace: nextcloud
|