Fixed file permissions and multitenancy feature (manually tested).

This commit is contained in:
Joschka Seydell 2024-01-14 16:40:45 +01:00
parent 4992e21ecf
commit 520ee33b0e
16 changed files with 68 additions and 54 deletions

6
templates/db.env.j2 Executable file
View file

@ -0,0 +1,6 @@
# See https://github.com/docker-library/mariadb/issues/262
MYSQL_INITDB_SKIP_TZINFO=1
MYSQL_ROOT_PASSWORD={{ nextcloud_mariadb_root_password }}
MYSQL_DATABASE={{ nextcloud_mysql_database }}
MYSQL_PASSWORD={{ nextcloud_mariadb_password }}
MYSQL_USER={{ nextcloud_mariadb_user }}

6
templates/docker-compose.nextcloud.yml.j2 Normal file → Executable file
View file

@ -8,8 +8,6 @@ networks:
services:
mysqldb:
image: mariadb:10.4.11
container_name: mysqldb{{ nextcloud_multitenant_postfix }}
hostname: mysqldb{{ nextcloud_multitenant_postfix }}
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
volumes:
- mysqldb{{ nextcloud_multitenant_postfix }}:/var/lib/mysql
@ -24,8 +22,6 @@ services:
nextcloud-app:
image: nextcloud:apache
container_name: nextcloud-app{{ nextcloud_multitenant_postfix }}
hostname: nextcloud-app{{ nextcloud_multitenant_postfix }}
networks:
- public
- default
@ -67,8 +63,6 @@ services:
# The backup service
backup:
image: zettaio/restic-compose-backup:0.4.2
container_name: backup{{ nextcloud_multitenant_postfix }}
hostname: backup{{ nextcloud_multitenant_postfix }}
env_file:
- restic-compose-backup.env
volumes:

5
templates/env.j2 Executable file
View file

@ -0,0 +1,5 @@
#
# Docker Compose configuration
#
# Project name for this Docker Compose setup
COMPOSE_PROJECT_NAME=nextcloud{{ nextcloud_multitenant_postfix }}

21
templates/nextcloud.env.j2 Executable file
View file

@ -0,0 +1,21 @@
# See https://github.com/nextcloud/docker/ for available env vars
VIRTUAL_HOST={{ nextcloud_virtual_host }}
LETSENCRYPT_HOST={{ nextcloud_letsencrypt_host }}
LETSENCRYPT_EMAIL={{ nextcloud_letsencrypt_email }}
MYSQL_HOST={{ nextcloud_mysql_host }}
MYSQL_DATABASE={{ nextcloud_mysql_database }}
MYSQL_PASSWORD={{ nextcloud_mariadb_password }}
MYSQL_USER={{ nextcloud_mariadb_user }}
NEXTCLOUD_ADMIN_USER={{ nextcloud_admin_user }}
NEXTCLOUD_ADMIN_PASSWORD={{ nextcloud_admin_password }}
NEXTCLOUD_TRUSTED_DOMAINS={{ nextcloud_trusted_domains }}
OVERWRITEPROTOCOL=https
OVERWRITECLIURL=https://{{ nextcloud_virtual_host }}
SMTP_HOST={{ nextcloud_smtp_host }}
SMTP_SECURE={{ nextcloud_smtp_secure }}
SMTP_PORT={{ nextcloud_smtp_port }}
SMTP_AUTHTYPE={{ nextcloud_smtp_authtype }}
SMTP_NAME={{ nextcloud_smtp_name }}
SMTP_PASSWORD={{ nextcloud_smtp_password }}
MAIL_FROM_ADDRESS={{ nextcloud_mail_from_address }}
MAIL_DOMAIN={{ nextcloud_mail_domain }}

View file

@ -0,0 +1,11 @@
AWS_ACCESS_KEY_ID={{ nextcloud_restic_aws_access_key_id }}
AWS_SECRET_ACCESS_KEY={{ nextcloud_restic_aws_secret_access_key }}
RESTIC_REPOSITORY={{ nextcloud_restic_repository }}
RESTIC_PASSWORD={{ nextcloud_restic_password }}
# snapshot prune rules
RESTIC_KEEP_DAILY={{ nextcloud_restic_keep_daily}}
RESTIC_KEEP_WEEKLY={{ nextcloud_restic_keep_weekly }}
RESTIC_KEEP_MONTHLY={{ nextcloud_restic_keep_monthly }}
RESTIC_KEEP_YEARLY={{ nextcloud_restic_keep_yearly }}
# Cron schedule. Run every day at 1am
CRON_SCHEDULE="{{ nextcloud_restic_cron_schedule }}"