diff --git a/docker/entrypoint_alpine.sh b/docker/entrypoint_alpine.sh index c1a75b0cbd..d9d6c8a9af 100644 --- a/docker/entrypoint_alpine.sh +++ b/docker/entrypoint_alpine.sh @@ -1,7 +1,48 @@ #!/bin/sh +# Cribbed from nextcloud docker official repo +# https://github.com/nextcloud/docker/blob/master/docker-entrypoint.sh +# usage: file_env VAR [DEFAULT] +# ie: file_env 'XYZ_DB_PASSWORD' 'example' +# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of +# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature) +file_env() { + local var="$1" + local fileVar="${var}_FILE" + local def="${2:-}" + local varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//") + local fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//") + if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then + echo >&2 "error: both $var and $fileVar are set (but are exclusive)" + exit 1 + fi + if [ -n "${varValue}" ]; then + export "$var"="${varValue}" + elif [ -n "${fileVarValue}" ]; then + export "$var"="$(cat "${fileVarValue}")" + elif [ -n "${def}" ]; then + export "$var"="$def" + fi + unset "$fileVar" +} + +# Add docker secrets support for the variables below: +file_env APP_KEY +file_env DB_HOST +file_env DB_PORT +file_env DB_DATABASE +file_env DB_USERNAME +file_env DB_PASSWORD +file_env REDIS_HOST +file_env REDIS_PASSWORD +file_env REDIS_PORT +file_env MAIL_HOST +file_env MAIL_PORT +file_env MAIL_USERNAME +file_env MAIL_PASSWORD + # fix key if needed -if [ -z "$APP_KEY" ] +if [ -z "$APP_KEY" -a -z "$APP_KEY_FILE" ] then echo "Please re-run this container with an environment variable \$APP_KEY" echo "An example APP_KEY you could use is: " diff --git a/docker/startup.sh b/docker/startup.sh index 62002a2ba0..2f6be7b0f8 100644 --- a/docker/startup.sh +++ b/docker/startup.sh @@ -1,7 +1,48 @@ #!/bin/bash +# Cribbed from nextcloud docker official repo +# https://github.com/nextcloud/docker/blob/master/docker-entrypoint.sh +# usage: file_env VAR [DEFAULT] +# ie: file_env 'XYZ_DB_PASSWORD' 'example' +# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of +# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature) +file_env() { + local var="$1" + local fileVar="${var}_FILE" + local def="${2:-}" + local varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//") + local fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//") + if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then + echo >&2 "error: both $var and $fileVar are set (but are exclusive)" + exit 1 + fi + if [ -n "${varValue}" ]; then + export "$var"="${varValue}" + elif [ -n "${fileVarValue}" ]; then + export "$var"="$(cat "${fileVarValue}")" + elif [ -n "${def}" ]; then + export "$var"="$def" + fi + unset "$fileVar" +} + +# Add docker secrets support for the variables below: +file_env APP_KEY +file_env DB_HOST +file_env DB_PORT +file_env DB_DATABASE +file_env DB_USERNAME +file_env DB_PASSWORD +file_env REDIS_HOST +file_env REDIS_PASSWORD +file_env REDIS_PORT +file_env MAIL_HOST +file_env MAIL_PORT +file_env MAIL_USERNAME +file_env MAIL_PASSWORD + # fix key if needed -if [ -z "$APP_KEY" ] +if [ -z "$APP_KEY" -a -z "$APP_KEY_FILE" ] then echo "Please re-run this container with an environment variable \$APP_KEY" echo "An example APP_KEY you could use is: " diff --git a/resources/assets/less/overrides.less b/resources/assets/less/overrides.less index 3717dd477a..a6a2347d41 100644 --- a/resources/assets/less/overrides.less +++ b/resources/assets/less/overrides.less @@ -845,18 +845,20 @@ th.css-location > .th-inner::before { } } @media screen and (max-width: 1318px) and (min-width: 1200px){ - .box{ + .admin.box{ height:170px; } } - -.ellipsis { - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; +@media screen and (max-width: 1494px) and (min-width: 1200px){ + .dashboard.small-box{ + white-space: nowrap; + text-overflow: ellipsis; + max-width: 188px; + display: block; + overflow: hidden; + } } - /** Form-stuff overrides for checkboxes and stuff **/ label.form-control { diff --git a/resources/views/dashboard.blade.php b/resources/views/dashboard.blade.php index 40255f88b2..2339122072 100755 --- a/resources/views/dashboard.blade.php +++ b/resources/views/dashboard.blade.php @@ -31,7 +31,7 @@
{{ strtolower(trans('general.assets')) }}
@@ -49,7 +49,7 @@{{ strtolower(trans('general.licenses')) }}
@@ -68,7 +68,7 @@{{ strtolower(trans('general.accessories')) }}
@@ -87,7 +87,7 @@ -{{ strtolower(trans('general.consumables')) }}
@@ -104,7 +104,7 @@{{ strtolower(trans('general.components')) }}
@@ -122,7 +122,7 @@{{ strtolower(trans('general.people')) }}
diff --git a/resources/views/settings/index.blade.php b/resources/views/settings/index.blade.php index 3b805f9215..ac7095814b 100755 --- a/resources/views/settings/index.blade.php +++ b/resources/views/settings/index.blade.php @@ -57,7 +57,7 @@