Compare commits
20 Commits
385a07b8c0
...
dev
Author | SHA1 | Date | |
---|---|---|---|
e661b67b57 | |||
8aaa8e97b9 | |||
8c6b258f48 | |||
8b7f94d51f | |||
ac60f54142 | |||
7265823f58 | |||
811442cd94 | |||
a90bf8bf28 | |||
82547068e3 | |||
167d813599 | |||
494d0c04bd | |||
4469754097 | |||
4ca8a8ae02 | |||
a3ce3a7ee1 | |||
0e761c5112 | |||
cf1e23e91c | |||
93be789790 | |||
6611665770 | |||
f8d4c4654e | |||
2e7efbc6eb |
1
.gitignore
vendored
1
.gitignore
vendored
@ -37,3 +37,4 @@ Config/Hyperling.com/files/*
|
|||||||
|
|
||||||
# Ignore things like Config/Hyperling.com-Stage/
|
# Ignore things like Config/Hyperling.com-Stage/
|
||||||
*-Stage
|
*-Stage
|
||||||
|
Stage-*
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
FROM node:lts-slim
|
FROM node:lts-slim
|
||||||
|
|
||||||
# Cache System Dependencies
|
# 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 curl
|
||||||
|
|
||||||
# Cache Node Dependencies
|
# Cache Node Dependencies
|
||||||
RUN mkdir -p /var/www/api
|
RUN mkdir -p /var/www/api
|
||||||
@ -21,5 +21,5 @@ CMD cd /var/www/api && \
|
|||||||
rm -rfv website/files && \
|
rm -rfv website/files && \
|
||||||
mv -v website/* ./ && \
|
mv -v website/* ./ && \
|
||||||
rm -rfv website && \
|
rm -rfv website && \
|
||||||
echo "Starting Website" && \
|
echo "Starting Website's Run Script" && \
|
||||||
./run.sh
|
./run.sh
|
||||||
|
9
Config/Hyperling.com/env.example
Normal file
9
Config/Hyperling.com/env.example
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# 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.
|
||||||
|
# Testing was done on the micro server, not a workstation.
|
||||||
|
COMPOSE_BAKE=true
|
11
Config/Nextcloud/Dockerfile
Normal file
11
Config/Nextcloud/Dockerfile
Normal file
@ -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
|
@ -4,19 +4,64 @@
|
|||||||
# This should be added to root's crontab with the full path, such as:
|
# This should be added to root's crontab with the full path, such as:
|
||||||
# */5 * * * * /opt/Docker/Config/Nextcloud/cron.ksh
|
# */5 * * * * /opt/Docker/Config/Nextcloud/cron.ksh
|
||||||
|
|
||||||
# Check if a job is already going.
|
DIR="$(dirname -- "${BASH_SOURCE[0]}")"
|
||||||
PROG="$(basename -- "${BASH_SOURCE[0]}")"
|
PROG="$(basename -- "${BASH_SOURCE[0]}")"
|
||||||
|
|
||||||
|
# Check if a job is already going.
|
||||||
RUNNING=`ps -ef | grep $PROG | grep -v grep | grep -v $$ | grep -v "sh -c" | wc -l`
|
RUNNING=`ps -ef | grep $PROG | grep -v grep | grep -v $$ | grep -v "sh -c" | wc -l`
|
||||||
if (( $RUNNING > 0 )); then
|
if (( $RUNNING > 0 )); then
|
||||||
exit $RUNNING
|
exit $RUNNING
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 2023-08-25 From crontab.
|
# Usage function for when -h or bad parameters are passed.
|
||||||
sh -c "docker exec -u www-data nc-app php cron.php --define apc.enable_cli=1"
|
function usage() {
|
||||||
|
cat <<- EOF
|
||||||
|
Script to help with scheduling Nextcloud's cron requirements.
|
||||||
|
Usage: $PROG [-h|-v]
|
||||||
|
-h ) Display the usage and help text.
|
||||||
|
| --help
|
||||||
|
-v) Pass a verbose request to cron.php.
|
||||||
|
| --verbose
|
||||||
|
EOF
|
||||||
|
exit $1
|
||||||
|
}
|
||||||
|
|
||||||
# 2023-08-25 From fixes.sh, keep ownership correct and apps up to date.
|
# Check for any parameters.
|
||||||
sh -c "docker exec -it nc-app chown -Rc www-data:www-data ."
|
verbose=""
|
||||||
|
case "$1" in
|
||||||
|
"") ;;
|
||||||
|
"-h"|"--help")
|
||||||
|
usage 0
|
||||||
|
;;
|
||||||
|
"-v"|"--verbose")
|
||||||
|
verbose="-v"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo -e "ERROR: Unknown parameter '$1'. Exiting.\n"
|
||||||
|
usage 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Keep ownership correct and apps up to date. Also exists in fixes.sh.
|
||||||
|
sh -c "docker exec -i nc-app chown -Rc www-data:www-data ."
|
||||||
# No longer update apps in advance of NC updates, allow the upgrade process to do it.
|
# No longer update apps in advance of NC updates, allow the upgrade process to do it.
|
||||||
#sh -c "docker exec -itu www-data nc-app ./occ app:update --all"
|
#sh -c "docker exec -itu www-data nc-app ./occ app:update --all"
|
||||||
|
|
||||||
|
# Prepare the variables being passed to the execution command.
|
||||||
|
if [[ -f $DIR/.env ]]; then
|
||||||
|
source $DIR/.env
|
||||||
|
else
|
||||||
|
PHP_MEMORY_LIMIT=256M
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Main part of what would go in the crontab.
|
||||||
|
sh -c "
|
||||||
|
docker exec nc-app \
|
||||||
|
sudo -u www-data \
|
||||||
|
php \
|
||||||
|
-d apc.enable_cli=1 \
|
||||||
|
-d memory_limit=$PHP_MEMORY_LIMIT \
|
||||||
|
-f cron.php $verbose \
|
||||||
|
"
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -72,7 +72,8 @@ services:
|
|||||||
## Nextcloud ##
|
## Nextcloud ##
|
||||||
nc-app:
|
nc-app:
|
||||||
container_name: nc-app
|
container_name: nc-app
|
||||||
image: nextcloud:stable
|
build:
|
||||||
|
context: ./
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- 8080:80
|
- 8080:80
|
||||||
|
@ -73,7 +73,8 @@ services:
|
|||||||
## Nextcloud ##
|
## Nextcloud ##
|
||||||
nc-app:
|
nc-app:
|
||||||
container_name: nc-app
|
container_name: nc-app
|
||||||
image: nextcloud:stable
|
build:
|
||||||
|
context: ./
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- 8080:80
|
- 8080:80
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Example environment file for Nextcloud stack, should be copied as `.env`. The
|
# Example environment file for Nextcloud stack, should be copied as `.env`.
|
||||||
# variables here only apply to the compose file. If you need it passed to a
|
|
||||||
|
# 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.
|
# container then it also needs specified in its `environment:` operator.
|
||||||
#
|
#
|
||||||
# ** All usernames and passwords need changed before running in production! **
|
# ** All usernames and passwords need changed before running in production! **
|
||||||
@ -7,6 +8,17 @@
|
|||||||
# Full guide on the Nextcloud parameters which may be supplied:
|
# 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
|
# 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, 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
|
||||||
|
|
||||||
#
|
#
|
||||||
## Nextcloud ##
|
## Nextcloud ##
|
||||||
#
|
#
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Example environment file for Nextcloud stack, should be copied as `.env`. The
|
# Example environment file for Nextcloud stack, should be copied as `.env`.
|
||||||
# variables here only apply to the compose file. If you need it passed to a
|
|
||||||
|
# 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.
|
# container then it also needs specified in its `environment:` operator.
|
||||||
#
|
#
|
||||||
# ** All usernames and passwords need changed before running in production! **
|
# ** All usernames and passwords need changed before running in production! **
|
||||||
@ -7,6 +8,17 @@
|
|||||||
# Full guide on the Nextcloud parameters which may be supplied:
|
# 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
|
# 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, 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
|
||||||
|
|
||||||
#
|
#
|
||||||
## Nextcloud ##
|
## Nextcloud ##
|
||||||
#
|
#
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# 2022-09-25 Hyperling
|
# 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 ##
|
## Setup ##
|
||||||
|
|
||||||
@ -11,19 +11,20 @@ source $DIR/../../source.env
|
|||||||
|
|
||||||
## Main ##
|
## Main ##
|
||||||
|
|
||||||
echo -e "\n*** APT ***"
|
##### 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` - 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 \
|
###echo -e "\n`date` - Install Additional Software"
|
||||||
iputils-ping dnsutils vim bzip2 libbz2-dev # php-bz2
|
###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
|
#### 20240130
|
||||||
echo -e "\n`date` - Compile PHP Modules"
|
#### https://help.nextcloud.com/t/docker-image-setup-warning-missing-bz2-after-update-to-nc-28-0-0/176605
|
||||||
docker exec -it nc-app docker-php-ext-install bz2
|
###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.
|
# 2023-12-04 Make sure cron and chmod commands get run.
|
||||||
echo -e "\n*** CRON ***"
|
echo -e "\n*** CRON ***"
|
||||||
@ -69,7 +70,7 @@ docker exec -itu www-data nc-app ./occ files:scan-app-data
|
|||||||
echo -e "\n`date` - Theme Update"
|
echo -e "\n`date` - Theme Update"
|
||||||
docker exec -itu www-data nc-app ./occ maintenance:theme:update
|
docker exec -itu www-data nc-app ./occ maintenance:theme:update
|
||||||
echo -e "\n`date` - Repair"
|
echo -e "\n`date` - Repair"
|
||||||
docker exec -itu www-data nc-app ./occ maintenance:repair
|
docker exec -itu www-data nc-app ./occ maintenance:repair --include-expensive
|
||||||
|
|
||||||
# May also be useful but do not have much experience with them.
|
# May also be useful but do not have much experience with them.
|
||||||
echo -e "\n`date` - Clean Versions"
|
echo -e "\n`date` - Clean Versions"
|
Reference in New Issue
Block a user