Major Enhancements (#20)

* Fix program for html websites, need to handle errors for non-local sites though.

* Add message that the main program is starting since node-modules does not show anything.

* Go ahead and give DB a bump.

* Fix warning in DB log and NC not having enough power sometimes.

* Fix errors in DB log.

* This command uses the root account, not nextcloud.

* Add example CRON file.

* Specify that the host network should be used.

* Specify that the host network should be used.

* Recommend daily reset of the photos library.

* Add another package the container is missing.

* Add a backup script for the project directory.

* Fix a typo.

* Improve example file and add the backup job.

* Add an example of pulling the backup file.

* Give the zip a temporary filename while being built.

* Always get the full path, relative path does not work well when not in `.`.

* Remove extra newline.

* Prevent doing large uploads on a micro Nextcloud instance.

* Change how bz2 gets installed.

* More trying to fix the annoying bz2 warning.

* Remove "bad" package.

* Use a temporary filename during transfer.

* Bump CPUs up just a bit more for Nextcloud to avoid sync errors.

* Be more explicit with instructions.
This commit is contained in:
2024-01-30 06:11:32 -07:00
committed by GitHub
parent cf0d028a58
commit 1ef1903f6b
14 changed files with 146 additions and 22 deletions

View File

@ -10,7 +10,9 @@ version: '3'
services:
app:
container_name: dns-app
build: ./
build:
context: ./
network: host
restart: always
ports:
- "53:53/udp"

View File

@ -15,4 +15,5 @@ CMD cd /var/www/api && \
rm -rfv website/files && \
mv -v website/* ./ && \
rm -rfv website && \
echo "Starting Website" && \
./run.sh

View File

@ -7,7 +7,9 @@ version: '2'
services:
app:
container_name: website-app
build: ./
build:
context: ./
network: host
restart: always
ports:
- 8317:8080

View File

@ -6,7 +6,9 @@ version: '2'
services:
app:
container_name: website-app
build: ./
build:
context: ./
network: host
restart: always
ports:
- 8317:8080

View File

@ -27,7 +27,7 @@ services:
container_name: nc-db
image: mariadb:10.6
restart: always
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW
volumes:
- ../../Volumes/Nextcloud/mariadb:/var/lib/mysql
environment:
@ -40,7 +40,7 @@ services:
resources:
limits:
cpus: '0.20'
memory: 192M
memory: 256M
## Redis ##
nc-redis:
@ -99,5 +99,5 @@ services:
mode: global
resources:
limits:
cpus: '0.30'
memory: 512M
cpus: '0.40'
memory: 640M

View File

@ -15,7 +15,7 @@ NEXTCLOUD_ADMIN_USER=nc_admin
NEXTCLOUD_ADMIN_PASSWORD=SuperDuperSecretPassword
PHP_MEMORY_LIMIT=512M
PHP_UPLOAD_LIMIT=512M
PHP_UPLOAD_LIMIT=32M
#
## MariaDB ##

View File

@ -6,6 +6,7 @@
DIR="$(dirname -- "${BASH_SOURCE[0]}")"
PROG="$(basename -- "${BASH_SOURCE[0]}")"
source $DIR/.env
source $DIR/../../source.env
## Main ##
@ -15,9 +16,14 @@ echo -e "\n*** APT ***"
echo -e "\n`date` - Update Apt Cache"
docker exec -it nc-app apt update -y
echo -e "\n`date` - Install Additonal Software"
echo -e "\n`date` - Install Additional Software"
docker exec -it nc-app apt install -y sudo libmagickcore-6.q16-6-extra htop \
iputils-ping dnsutils vim
iputils-ping dnsutils vim bzip2 libbz2-dev # php-bz2
# 20240130
# https://help.nextcloud.com/t/docker-image-setup-warning-missing-bz2-after-update-to-nc-28-0-0/176605
echo -e "\n`date` - Compile PHP Modules"
docker exec -it nc-app docker-php-ext-install bz2
# 2023-12-04 Make sure cron and chmod commands get run.
echo -e "\n*** CRON ***"
@ -28,6 +34,14 @@ $DOCKER_HOME/Config/Nextcloud/cron.sh && echo "Success!"
# 2022-10-30 More additions after moving to Nextcloud version 25.
echo -e "\n*** DATABASE ***"
# Clear DB errors by allowing the DB to perform any incremental upgrades.
# https://jira.mariadb.org/browse/MDEV-26342
echo -e "\n`date` - mysql_upgrade"
docker exec -itu www-data nc-app ./occ maintenance:mode --on
time docker exec -it nc-db mysql_upgrade \
-user="root" --password="$MYSQL_ROOT_PASSWORD"
docker exec -itu www-data nc-app ./occ maintenance:mode --off
echo -e "\n`date` - Add Missing Columns"
docker exec -itu www-data nc-app ./occ db:add-missing-columns

View File

@ -11,7 +11,9 @@ services:
app:
container_name: rp-app
build: ./
build:
context: ./
network: host
restart: always
ports:
- "80:80"

View File

@ -11,7 +11,9 @@ services:
app:
container_name: rp-app
build: ./
build:
context: ./
network: host
restart: always
ports:
- "80:80"