Chad
1ef1903f6b
* 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.
36 lines
760 B
Bash
Executable File
36 lines
760 B
Bash
Executable File
#!/bin/bash
|
|
# Provide any necessary project variables.
|
|
# Needs run in the current shell environment, such as:
|
|
# source /PATH_TO_PROJECT/source.env
|
|
|
|
DIR="$(dirname -- "${BASH_SOURCE[0]}")"
|
|
PROG="$(basename -- "${BASH_SOURCE[0]}")"
|
|
|
|
# Get the absolute path.
|
|
CURR="`pwd`"
|
|
cd $DIR
|
|
DIR="`pwd`"
|
|
cd "$CURR"
|
|
|
|
## Variables ##
|
|
|
|
DOCKER_HOME="$DIR"
|
|
DOCKER_PATH="$DOCKER_HOME/bin"
|
|
PATH="$DOCKER_PATH:$PATH"
|
|
|
|
export DOCKER_HOME DOCKER_PATH PATH
|
|
|
|
## Aliases ##
|
|
|
|
alias manage="$DOCKER_HOME/bin/manage.sh"
|
|
|
|
## Validations ##
|
|
|
|
if [[ -e $DOCKER_HOME/$PROG ]]; then
|
|
echo "'$DOCKER_HOME/$PROG' has been loaded successfully."
|
|
else
|
|
echo "ERROR: Something has gone wrong, could not find '$PROG' from absolute "
|
|
echo "path, Docker Home '$DOCKER_HOME' is likely wrong."
|
|
exit 1
|
|
fi
|