Rename role for intersect docker applications
This commit is contained in:
39
ansible/roles/intersect-docker/files/nextcloud/config.php
Normal file
39
ansible/roles/intersect-docker/files/nextcloud/config.php
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
$CONFIG = array (
|
||||
'memcache.local' => '\\OC\\Memcache\\APCu',
|
||||
'memcache.locking' => '\\OC\\Memcache\\Redis',
|
||||
'memcache.distributed' => '\\OC\\Memcache\\Redis',
|
||||
'filelocking.enabled' => true,
|
||||
'redis' =>
|
||||
array (
|
||||
'host' => 'redis',
|
||||
'port' => 6379,
|
||||
'timeout' => 0.0,
|
||||
),
|
||||
'datadirectory' => '/data',
|
||||
'instanceid' => '{{ nextcloud.instance_id }}',
|
||||
'passwordsalt' => '{{ nextcloud.passwordsalt }}',
|
||||
'secret' => '{{ nextcloud.secret }}',
|
||||
'trusted_domains' =>
|
||||
array (
|
||||
0 => 'intersect.jakehoward.tech',
|
||||
),
|
||||
'dbtype' => 'pgsql',
|
||||
'version' => '18.0.4.2',
|
||||
'overwrite.cli.url' => 'https://intersect.jakehoward.tech',
|
||||
'dbname' => 'nextcloud',
|
||||
'dbhost' => 'db',
|
||||
'dbport' => '5432',
|
||||
'dbtableprefix' => 'oc_',
|
||||
'mysql.utf8mb4' => true,
|
||||
'dbuser' => 'nextcloud',
|
||||
'dbpassword' => 'nextcloud',
|
||||
'installed' => true,
|
||||
'trusted_proxies' =>
|
||||
array (
|
||||
0 => '10.23.0.1/24',
|
||||
),
|
||||
'maintenance' => false,
|
||||
'theme' => '',
|
||||
'loglevel' => 2,
|
||||
);
|
89
ansible/roles/intersect-docker/files/nextcloud/default.conf
Normal file
89
ansible/roles/intersect-docker/files/nextcloud/default.conf
Normal file
@ -0,0 +1,89 @@
|
||||
upstream php-handler {
|
||||
server 127.0.0.1:9000;
|
||||
}
|
||||
#server {
|
||||
# listen 80;
|
||||
# listen [::]:80;
|
||||
# server_name _;
|
||||
# return 301 https://$host$request_uri;
|
||||
#}
|
||||
server {
|
||||
#listen 443 ssl http2;
|
||||
#listen [::]:443 ssl http2;
|
||||
listen 80;
|
||||
server_name _;
|
||||
#ssl_certificate /config/keys/cert.crt;
|
||||
#ssl_certificate_key /config/keys/cert.key;
|
||||
add_header X-Content-Type-Options nosniff;
|
||||
add_header X-XSS-Protection "1; mode=block";
|
||||
add_header X-Robots-Tag none;
|
||||
add_header X-Download-Options noopen;
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
add_header X-Permitted-Cross-Domain-Policies none;
|
||||
add_header Referrer-Policy no-referrer;
|
||||
add_header Strict-Transport-Security "max-age=15768000;";
|
||||
fastcgi_hide_header X-Powered-By;
|
||||
root /config/www/nextcloud/;
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
location = /.well-known/carddav {
|
||||
return 301 https://$host/remote.php/dav;
|
||||
}
|
||||
location = /.well-known/caldav {
|
||||
return 301 https://$host/remote.php/dav;
|
||||
}
|
||||
client_max_body_size 10G;
|
||||
fastcgi_buffers 64 4K;
|
||||
gzip on;
|
||||
gzip_vary on;
|
||||
gzip_comp_level 4;
|
||||
gzip_min_length 256;
|
||||
gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
|
||||
gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;
|
||||
location / {
|
||||
rewrite ^ /index.php;
|
||||
}
|
||||
location ~ ^\/(?:build|tests|config|lib|3rdparty|templates|data)\/ {
|
||||
deny all;
|
||||
}
|
||||
location ~ ^\/(?:\.|autotest|occ|issue|indie|db_|console) {
|
||||
deny all;
|
||||
}
|
||||
location ~ ^\/(?:index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|ocm-provider\/.+)\.php(?:$|\/) {
|
||||
fastcgi_split_path_info ^(.+?\.php)(\/.*|)$;
|
||||
try_files $fastcgi_script_name =404;
|
||||
include /etc/nginx/fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
fastcgi_param HTTPS on;
|
||||
fastcgi_param modHeadersAvailable true;
|
||||
fastcgi_param front_controller_active true;
|
||||
fastcgi_pass php-handler;
|
||||
fastcgi_intercept_errors on;
|
||||
fastcgi_request_buffering off;
|
||||
}
|
||||
|
||||
location ~ ^\/(?:updater|ocs-provider|ocm-provider)(?:$|\/) {
|
||||
try_files $uri/ =404;
|
||||
index index.php;
|
||||
}
|
||||
location ~ \.(?:css|js|woff2?|svg|gif|map)$ {
|
||||
try_files $uri /index.php$request_uri;
|
||||
add_header Cache-Control "public, max-age=15778463";
|
||||
add_header X-Content-Type-Options nosniff;
|
||||
add_header X-XSS-Protection "1; mode=block";
|
||||
add_header X-Robots-Tag none;
|
||||
add_header X-Download-Options noopen;
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
add_header X-Permitted-Cross-Domain-Policies none;
|
||||
add_header Referrer-Policy no-referrer;
|
||||
access_log off;
|
||||
}
|
||||
location ~ \.(?:png|html|ttf|ico|jpg|jpeg|bcmap)$ {
|
||||
try_files $uri /index.php$request_uri;
|
||||
access_log off;
|
||||
}
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
version: "2.3"
|
||||
|
||||
services:
|
||||
nextcloud:
|
||||
image: linuxserver/nextcloud:18.0.4-ls76
|
||||
container_name: nextcloud
|
||||
environment:
|
||||
- PUID={{ docker_user.id }}
|
||||
- PGID={{ docker_user.id }}
|
||||
- TZ=Europe/London
|
||||
volumes:
|
||||
- ./nextcloud/config:/config/www/nextcloud/config
|
||||
- ./nextcloud/apps:/config/www/nextcloud/apps
|
||||
- ./nextcloud/nginx-default.conf:/config/nginx/site-confs/default
|
||||
- /srv/nextcloud-data/data:/data
|
||||
- /opt/gitea/repos:/repos:ro
|
||||
- /mnt/media:/content:ro
|
||||
restart: unless-stopped
|
||||
tmpfs:
|
||||
- /config/log
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.nextcloud.rule=Host(`intersect.jakehoward.tech`)"
|
||||
- "traefik.http.routers.nextcloud.tls=true"
|
||||
- "traefik.http.routers.nextcloud.tls.certresolver=le"
|
||||
|
||||
db:
|
||||
image: postgres:12-alpine
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./postgres:/var/lib/postgresql/data
|
||||
environment:
|
||||
- POSTGRES_PASSWORD=nextcloud
|
||||
- POSTGRES_USER=nextcloud
|
||||
|
||||
db-backups:
|
||||
image: prodrigestivill/postgres-backup-local:12-alpine
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- /scratch/db-backups:/backups
|
||||
depends_on:
|
||||
- db
|
||||
environment:
|
||||
- POSTGRES_HOST=db
|
||||
- POSTGRES_PASSWORD=nextcloud
|
||||
- POSTGRES_USER=nextcloud
|
||||
- POSTGRES_DB=nextcloud
|
||||
- BACKUP_KEEP_MONTHS=1
|
||||
- BACKUP_KEEP_WEEKS=1
|
||||
|
||||
redis:
|
||||
image: redis:5-alpine
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./redis:/data
|
||||
|
||||
onlyoffice:
|
||||
image: onlyoffice/documentserver
|
||||
container_name: onlyoffice
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- JWT_ENABLED=true
|
||||
- JWT_SECRET={{ nextcloud.onlyoffice_jwt_secret }}
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.onlyoffice.rule=Host(`onlyoffice.jakehoward.tech`)"
|
||||
- "traefik.http.routers.onlyoffice.tls=true"
|
||||
- "traefik.http.routers.onlyoffice.tls.certresolver=le"
|
||||
- "traefik.http.routers.onlyoffice.middlewares=oo-header"
|
||||
- "traefik.http.middlewares.oo-header.headers.customRequestHeaders.X-Forwarded-Proto=https"
|
Reference in New Issue
Block a user