env-docker/source.env
Chad f45cc326fc
Fixes and Enhancements (#16)
* Add more instructions after successfully creating a new subdomain.

* Update the container name.

* Add a just-in-case step.

* Add an alias and improve comments.

* Fix manage path.

* Add limits but no reservations for PP. Start off somewhat relaxed rather than strict.

* Always restart PP containers.

* Move URL to env file. Do not recommend using HTTPS in the value.

* Format comments.

* Put commands in shells so they cannot exit the full program.

* Updating apps like this did not seem to be working, but also do not want it to work anymore.
2023-10-17 04:35:57 -07:00

36 lines
775 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]}")"
if [[ "$DIR" == '.'* ]]; then
RETURN="`pwd`"
cd $DIR
DIR="`pwd`"
cd "$RETURN"
fi
## 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