mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-01-06 05:51:49 +08:00
Merge pull request #728 from nextcloud/enh/725/log-files
adjust log files to be stored in a volume
This commit is contained in:
commit
00964ae824
2 changed files with 7 additions and 4 deletions
|
@ -222,8 +222,6 @@ RUN set -ex; \
|
|||
chown www-data:root -R /usr/local/etc/php/conf.d && \
|
||||
chown www-data:root -R /var/log/supervisord/ && \
|
||||
chown www-data:root -R /var/run/supervisord/ && \
|
||||
mkdir -p /var/log/nextcloud/ && \
|
||||
chown -R www-data:root /var/log/nextcloud/ && \
|
||||
rm -r /usr/src/nextcloud/apps/updatenotification
|
||||
|
||||
COPY start.sh /
|
||||
|
|
|
@ -170,10 +170,10 @@ if ! [ -f "/mnt/ncdata/skip.update" ]; then
|
|||
mkdir -p /var/www/html/data
|
||||
php /var/www/html/occ config:system:set loglevel --value=2
|
||||
php /var/www/html/occ config:system:set log_type --value=file
|
||||
php /var/www/html/occ config:system:set logfile --value="/var/log/nextcloud/nextcloud.log"
|
||||
php /var/www/html/occ config:system:set logfile --value="/var/www/html/data/nextcloud.log"
|
||||
php /var/www/html/occ config:system:set log_rotate_size --value="10485760"
|
||||
php /var/www/html/occ app:enable admin_audit
|
||||
php /var/www/html/occ config:app:set admin_audit logfile --value="/var/log/nextcloud/audit.log"
|
||||
php /var/www/html/occ config:app:set admin_audit logfile --value="/var/www/html/data/audit.log"
|
||||
php /var/www/html/occ config:system:set log.condition apps 0 --value="admin_audit"
|
||||
|
||||
# Apply preview settings
|
||||
|
@ -272,6 +272,11 @@ echo "Applying one-click-instance settings..."
|
|||
php /var/www/html/occ config:system:set one-click-instance --value=true --type=bool
|
||||
php /var/www/html/occ config:system:set one-click-instance.user-limit --value=100 --type=int
|
||||
|
||||
# Adjusting log files to be stored on a volume
|
||||
echo "Adjusting log files..."
|
||||
php /var/www/html/occ config:system:set logfile --value="/var/www/html/data/nextcloud.log"
|
||||
php /var/www/html/occ config:app:set admin_audit logfile --value="/var/www/html/data/audit.log"
|
||||
|
||||
# Apply network settings
|
||||
echo "Applying network settings..."
|
||||
php /var/www/html/occ config:system:set trusted_domains 1 --value="$NC_DOMAIN"
|
||||
|
|
Loading…
Reference in a new issue