Add support to start onlyoffice docker container with JWT_SECRET
Docker prune added as step
This commit is contained in:
@@ -12,8 +12,8 @@ dockerDeps="apt-transport-https ca-certificates curl gnupg-agent software-proper
|
||||
dockerGpgKeyUrl="https://download.docker.com/linux/ubuntu/gpg"
|
||||
dockerRepoUrl="https://download.docker.com/linux/ubuntu"
|
||||
dockerPackages="docker-ce docker-ce-cli containerd.io"
|
||||
dockerDns1="192.168.23.20"
|
||||
dockerDns2="46.182.19.48"
|
||||
dockerDns1="80.241.218.68" # https://dismail.de/info.html#dns
|
||||
dockerDns2="46.182.19.48" # https://digitalcourage.de/support/zensurfreier-dns-server
|
||||
dockerDnsEntry="DOCKER_OPTS=\"--dns $dockerDns1 --dns $dockerDns2\""
|
||||
dockerDefaultConf="/etc/default/docker"
|
||||
onlyOfficePort="8026"
|
||||
@@ -67,10 +67,20 @@ step_4() {
|
||||
fi
|
||||
}
|
||||
|
||||
step_5_info() { echo "Install onlyoffice docker container"; }
|
||||
step_5_alias() { ALIAS="onlyoffice"; }
|
||||
step_5_info() { echo "Install/start onlyoffice docker container <SECRET>"; }
|
||||
step_5_alias() { ALIAS="startoo"; }
|
||||
step_5() {
|
||||
local options=
|
||||
# The correct expansion for missing SECRET or SECRET with spaces is not possible.
|
||||
# Therefore docker without secret needs to be called separately
|
||||
if [ ! -z "$2" ] && [ "$2" != "" ] ; then
|
||||
options="-e JWT_ENABLED=true -e JWT_SECRET="
|
||||
# This is the only way to provide SECRET($2) to docker command line which handles all types of characters.
|
||||
exe docker run -i -t -d -p ${onlyOfficePort}:80 ${options}"$2" --restart=always onlyoffice/documentserver
|
||||
else
|
||||
echo " [I] Running $toolName without JWT (JSON Web Tokens)"
|
||||
exe docker run -i -t -d -p ${onlyOfficePort}:80 --restart=always onlyoffice/documentserver
|
||||
fi
|
||||
}
|
||||
|
||||
step_10_info() { echo "List running Docker container"; }
|
||||
@@ -83,6 +93,13 @@ step_10() {
|
||||
echo " e.g.: docker stop 70f1c5c81be2"
|
||||
}
|
||||
|
||||
step_12_info() { echo "Clean unused Docker data (unused containers, dangling images, networks and build cache)"; }
|
||||
step_12_alias() { ALIAS="prune"; }
|
||||
step_12() {
|
||||
exe docker system df
|
||||
exe docker system prune
|
||||
}
|
||||
|
||||
step_100_info() { echo "Uninstall docker"; }
|
||||
step_100_alias() { ALIAS="uninstall"; }
|
||||
step_100() {
|
||||
|
Reference in New Issue
Block a user