From 82547068e3a98216977d7cf759bf41b12b8c5c29 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Mon, 16 Jun 2025 15:09:48 -0600 Subject: [PATCH 1/8] Add sudo to the website's container. --- Config/Hyperling.com/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Config/Hyperling.com/Dockerfile b/Config/Hyperling.com/Dockerfile index 9459726..ca35223 100644 --- a/Config/Hyperling.com/Dockerfile +++ b/Config/Hyperling.com/Dockerfile @@ -6,7 +6,7 @@ FROM node:lts-slim # Cache System Dependencies -RUN apt-get update && apt-get install -y git php-cli +RUN apt-get update && apt-get install -y git php-cli sudo # Cache Node Dependencies RUN mkdir -p /var/www/api -- 2.49.0 From a90bf8bf281e29b8d381fe16b171b9b5372164f0 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Mon, 16 Jun 2025 15:20:00 -0600 Subject: [PATCH 2/8] Provide a better explanation of what's happening in the log. --- Config/Hyperling.com/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Config/Hyperling.com/Dockerfile b/Config/Hyperling.com/Dockerfile index ca35223..ffef3c0 100644 --- a/Config/Hyperling.com/Dockerfile +++ b/Config/Hyperling.com/Dockerfile @@ -21,5 +21,5 @@ CMD cd /var/www/api && \ rm -rfv website/files && \ mv -v website/* ./ && \ rm -rfv website && \ - echo "Starting Website" && \ + echo "Starting Website's Run Script" && \ ./run.sh -- 2.49.0 From 811442cd94e3a9c06a596242e53a4a4cd0b0f4c5 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Mon, 16 Jun 2025 15:32:47 -0600 Subject: [PATCH 3/8] Add an `.env` file for the website. --- Config/Hyperling.com/env.example | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 Config/Hyperling.com/env.example diff --git a/Config/Hyperling.com/env.example b/Config/Hyperling.com/env.example new file mode 100644 index 0000000..c4b892e --- /dev/null +++ b/Config/Hyperling.com/env.example @@ -0,0 +1,8 @@ +# This file should be renamed '.env' and have any private values modified. + +## 2025-06-16 +## Performance Notes for Enabling BAKE +# Compose by itself takes about 35s to build this project. +# Enabling this setting first cause the build to take 80s. +# Subsequent builds consistently take less than 2 seconds. +COMPOSE_BAKE=true -- 2.49.0 From 7265823f580672abbe161d3b964e44544c59513d Mon Sep 17 00:00:00 2001 From: Hyperling Date: Mon, 16 Jun 2025 15:43:55 -0600 Subject: [PATCH 4/8] Add curl to the container so that the run script doesn't need to install it each time. --- Config/Hyperling.com/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Config/Hyperling.com/Dockerfile b/Config/Hyperling.com/Dockerfile index ffef3c0..29daecd 100644 --- a/Config/Hyperling.com/Dockerfile +++ b/Config/Hyperling.com/Dockerfile @@ -6,7 +6,7 @@ FROM node:lts-slim # Cache System Dependencies -RUN apt-get update && apt-get install -y git php-cli sudo +RUN apt-get update && apt-get install -y git php-cli sudo curl # Cache Node Dependencies RUN mkdir -p /var/www/api -- 2.49.0 From ac60f541421aaec7af980219b712ad05c8f62b5f Mon Sep 17 00:00:00 2001 From: Hyperling Date: Mon, 16 Jun 2025 17:17:47 -0600 Subject: [PATCH 5/8] Move the most important fixes to a Docker build file. `fixes.sh` is now just a list of maintenance jobs, name it so. Hooray!! --- Config/Nextcloud/Dockerfile | 11 +++++++ Config/Nextcloud/docker-compose.micro.yml | 3 +- Config/Nextcloud/docker-compose.standard.yml | 3 +- Config/Nextcloud/{fixes.sh => maintenance.sh} | 29 ++++++++++--------- 4 files changed, 30 insertions(+), 16 deletions(-) create mode 100644 Config/Nextcloud/Dockerfile rename Config/Nextcloud/{fixes.sh => maintenance.sh} (75%) diff --git a/Config/Nextcloud/Dockerfile b/Config/Nextcloud/Dockerfile new file mode 100644 index 0000000..8f105d0 --- /dev/null +++ b/Config/Nextcloud/Dockerfile @@ -0,0 +1,11 @@ +# 2025-06-16 Hyperling +# Tired of running fixes.sh to install extra packages. Bake them in! + +FROM nextcloud:stable + +# Cache System Dependencies +RUN apt-get update && apt-get install -y sudo libmagickcore-6.q16-6-extra htop \ + iputils-ping dnsutils vim bzip2 libbz2-dev + +# Configure PHP Dependency +RUN docker-php-ext-install bz2 diff --git a/Config/Nextcloud/docker-compose.micro.yml b/Config/Nextcloud/docker-compose.micro.yml index ec88316..339f906 100644 --- a/Config/Nextcloud/docker-compose.micro.yml +++ b/Config/Nextcloud/docker-compose.micro.yml @@ -72,7 +72,8 @@ services: ## Nextcloud ## nc-app: container_name: nc-app - image: nextcloud:stable + build: + context: ./ restart: always ports: - 8080:80 diff --git a/Config/Nextcloud/docker-compose.standard.yml b/Config/Nextcloud/docker-compose.standard.yml index a1cdb6d..0343153 100644 --- a/Config/Nextcloud/docker-compose.standard.yml +++ b/Config/Nextcloud/docker-compose.standard.yml @@ -73,7 +73,8 @@ services: ## Nextcloud ## nc-app: container_name: nc-app - image: nextcloud:stable + build: + context: ./ restart: always ports: - 8080:80 diff --git a/Config/Nextcloud/fixes.sh b/Config/Nextcloud/maintenance.sh similarity index 75% rename from Config/Nextcloud/fixes.sh rename to Config/Nextcloud/maintenance.sh index 270ab56..39cc526 100755 --- a/Config/Nextcloud/fixes.sh +++ b/Config/Nextcloud/maintenance.sh @@ -1,6 +1,6 @@ #!/bin/bash # 2022-09-25 Hyperling -# Put fixes in a file so they do not need remembered. +# Put maintenance needs into a file so the commands do not need remembered. ## Setup ## @@ -11,19 +11,20 @@ source $DIR/../../source.env ## Main ## -echo -e "\n*** APT ***" - -echo -e "\n`date` - Update Apt Cache" -docker exec -it nc-app apt update -y - -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 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 +##### 20250616 - Apt and PHP commands now baked into the Dockerfile!! :D ##### +###echo -e "\n*** APT ***" +### +###echo -e "\n`date` - Update Apt Cache" +###docker exec -it nc-app apt update -y +### +###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 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 ***" -- 2.49.0 From 8b7f94d51f2c1b4b34bd076dff0cddca25ca7643 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Mon, 16 Jun 2025 17:32:15 -0600 Subject: [PATCH 6/8] Add note as to what type of system the testing was done on. --- Config/Hyperling.com/env.example | 1 + 1 file changed, 1 insertion(+) diff --git a/Config/Hyperling.com/env.example b/Config/Hyperling.com/env.example index c4b892e..768122e 100644 --- a/Config/Hyperling.com/env.example +++ b/Config/Hyperling.com/env.example @@ -5,4 +5,5 @@ # Compose by itself takes about 35s to build this project. # Enabling this setting first cause the build to take 80s. # Subsequent builds consistently take less than 2 seconds. +# Testing was done on the micro server, not a workstation. COMPOSE_BAKE=true -- 2.49.0 From 8c6b258f4863e853b5a95c75de30b715243a9766 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Mon, 16 Jun 2025 17:32:33 -0600 Subject: [PATCH 7/8] Add BAKE to Nextcloud subproject. --- Config/Nextcloud/env.micro | 15 +++++++++++++-- Config/Nextcloud/env.standard | 15 +++++++++++++-- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/Config/Nextcloud/env.micro b/Config/Nextcloud/env.micro index 0d7b512..8c31d4c 100644 --- a/Config/Nextcloud/env.micro +++ b/Config/Nextcloud/env.micro @@ -1,5 +1,6 @@ -# Example environment file for Nextcloud stack, should be copied as `.env`. The -# variables here only apply to the compose file. If you need it passed to a +# Example environment file for Nextcloud stack, should be copied as `.env`. + +# The variables here only apply to the compose file. If you need it passed to a # container then it also needs specified in its `environment:` operator. # # ** All usernames and passwords need changed before running in production! ** @@ -7,6 +8,16 @@ # Full guide on the Nextcloud parameters which may be supplied: # https://github.com/docker-library/docs/blob/master/nextcloud/README.md#auto-configuration-via-environment-variables +# +## Docker ## +# + +# 20250616 - Performance testing was done on an old workstation. +# Only Compose: 3.8, 2.5, 1.8, 1.8, 2.1 seconds +# Compose Bake: 2.0, 1.9, 1.8, 2.2, 1.9 seconds +# Not really needed but also does not seem harmful. Will eliminate the warning. +COMPOSE_BAKE=true + # ## Nextcloud ## # diff --git a/Config/Nextcloud/env.standard b/Config/Nextcloud/env.standard index f3e1349..cad9bea 100644 --- a/Config/Nextcloud/env.standard +++ b/Config/Nextcloud/env.standard @@ -1,5 +1,6 @@ -# Example environment file for Nextcloud stack, should be copied as `.env`. The -# variables here only apply to the compose file. If you need it passed to a +# Example environment file for Nextcloud stack, should be copied as `.env`. + +# The variables here only apply to the compose file. If you need it passed to a # container then it also needs specified in its `environment:` operator. # # ** All usernames and passwords need changed before running in production! ** @@ -7,6 +8,16 @@ # Full guide on the Nextcloud parameters which may be supplied: # https://github.com/docker-library/docs/blob/master/nextcloud/README.md#auto-configuration-via-environment-variables +# +## Docker ## +# + +# 20250616 - Performance testing was done on an old workstation. +# Only Compose: 3.8, 2.5, 1.8, 1.8, 2.1 seconds +# Compose Bake: 2.0, 1.9, 1.8, 2.2, 1.9 seconds +# Not really needed but also does not seem harmful. Will eliminate the warning. +COMPOSE_BAKE=true + # ## Nextcloud ## # -- 2.49.0 From 8aaa8e97b95633e89d8f4df05d6e344315d5cfa2 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Mon, 16 Jun 2025 18:19:00 -0600 Subject: [PATCH 8/8] Update the BAKE performance data/ --- Config/Nextcloud/env.micro | 7 ++++--- Config/Nextcloud/env.standard | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Config/Nextcloud/env.micro b/Config/Nextcloud/env.micro index 8c31d4c..96d3b94 100644 --- a/Config/Nextcloud/env.micro +++ b/Config/Nextcloud/env.micro @@ -13,9 +13,10 @@ # # 20250616 - Performance testing was done on an old workstation. -# Only Compose: 3.8, 2.5, 1.8, 1.8, 2.1 seconds -# Compose Bake: 2.0, 1.9, 1.8, 2.2, 1.9 seconds -# Not really needed but also does not seem harmful. Will eliminate the warning. +# Only Compose: 3.8, 2.5, 1.8, 1.8, 2.1, 2.0, 1.7 seconds +# Compose Bake: 3.7, 0.9, 2.3, 2.0, 3.1, 2.1, 1.8 seconds +# Not really needed but also not harmful and will eliminate the warning. +# Timings do not include the initial pull for either method. COMPOSE_BAKE=true # diff --git a/Config/Nextcloud/env.standard b/Config/Nextcloud/env.standard index cad9bea..37bf875 100644 --- a/Config/Nextcloud/env.standard +++ b/Config/Nextcloud/env.standard @@ -13,9 +13,10 @@ # # 20250616 - Performance testing was done on an old workstation. -# Only Compose: 3.8, 2.5, 1.8, 1.8, 2.1 seconds -# Compose Bake: 2.0, 1.9, 1.8, 2.2, 1.9 seconds -# Not really needed but also does not seem harmful. Will eliminate the warning. +# Only Compose: 3.8, 2.5, 1.8, 1.8, 2.1, 2.0, 1.7 seconds +# Compose Bake: 3.7, 0.9, 2.3, 2.0, 3.1, 2.1, 1.8 seconds +# Not really needed but also not harmful and will eliminate the warning. +# Timings do not include the initial pull for either method. COMPOSE_BAKE=true # -- 2.49.0