diff --git a/nextcloud-aks/config.example.env b/nextcloud-aks/config.example.env index 442444c..ef0992b 100644 --- a/nextcloud-aks/config.example.env +++ b/nextcloud-aks/config.example.env @@ -33,6 +33,18 @@ LOCATION="West US 2" # POD_TYPE="apache" +## +# The default container version to publish and pull down. +# +# This can be overridden on the command-line by prefixing each command with it. +# For example: +# ``` +# CONTAINER_VERSION=1.0.0 ./publish_container_images.sh +# CONTAINER_VERSION=1.0.0 ./deploy_nextcloud_app.sh +# ``` +# +CONTAINER_VERSION="${CONTAINER_VERSION:-latest}" + ################################################################################ # Kubernetes Cluster Settings ################################################################################ diff --git a/nextcloud-aks/configs/nextcloud-apache.template.yaml b/nextcloud-aks/configs/nextcloud-apache.template.yaml index 47b5d0f..20b1295 100644 --- a/nextcloud-aks/configs/nextcloud-apache.template.yaml +++ b/nextcloud-aks/configs/nextcloud-apache.template.yaml @@ -25,7 +25,7 @@ spec: containers: # Container: The Apache-based Nextcloud backend - name: backend-nextcloud-apache - image: "${REGISTRY_HOST}/inveniem/nextcloud-apache:latest" + image: "${REGISTRY_HOST}/inveniem/nextcloud-apache:${CONTAINER_VERSION}" imagePullPolicy: Always ports: - containerPort: 80 diff --git a/nextcloud-aks/configs/nextcloud-fpm-nginx.template.yaml b/nextcloud-aks/configs/nextcloud-fpm-nginx.template.yaml index ace80bb..41fe7a2 100644 --- a/nextcloud-aks/configs/nextcloud-fpm-nginx.template.yaml +++ b/nextcloud-aks/configs/nextcloud-fpm-nginx.template.yaml @@ -25,7 +25,7 @@ spec: containers: # Container: The PHP-FPM-based Nextcloud backend - name: backend-nextcloud-fpm - image: "${REGISTRY_HOST}/inveniem/nextcloud-fpm:latest" + image: "${REGISTRY_HOST}/inveniem/nextcloud-fpm:${CONTAINER_VERSION}" imagePullPolicy: Always resources: requests: @@ -129,7 +129,7 @@ spec: value: "DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA" # Container: Nginx Server Middleware - name: middle-nextcloud-nginx - image: "${REGISTRY_HOST}/inveniem/nextcloud-nginx-middleware:latest" + image: "${REGISTRY_HOST}/inveniem/nextcloud-nginx-middleware:${CONTAINER_VERSION}" imagePullPolicy: Always ports: - containerPort: 80 diff --git a/nextcloud-aks/docker/backend-nextcloud-apache/publish.sh b/nextcloud-aks/docker/backend-nextcloud-apache/publish.sh index e1ebb14..77ff210 100755 --- a/nextcloud-aks/docker/backend-nextcloud-apache/publish.sh +++ b/nextcloud-aks/docker/backend-nextcloud-apache/publish.sh @@ -12,13 +12,14 @@ set -e set -u -CONTAINER_NAME="inveniem/nextcloud-apache:latest" - SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" cd "${SCRIPT_DIR}" source '../../config.env' +CONTAINER_VERSION="${CONTAINER_VERSION:-latest}" +CONTAINER_NAME="inveniem/nextcloud-apache:${CONTAINER_VERSION}" + ../nextcloud-common/generate_nr_setup_command.sh docker build -t "${CONTAINER_NAME}" -f Dockerfile .. diff --git a/nextcloud-aks/docker/backend-nextcloud-fpm/publish.sh b/nextcloud-aks/docker/backend-nextcloud-fpm/publish.sh index 4e2351f..f1166c1 100755 --- a/nextcloud-aks/docker/backend-nextcloud-fpm/publish.sh +++ b/nextcloud-aks/docker/backend-nextcloud-fpm/publish.sh @@ -12,13 +12,14 @@ set -e set -u -CONTAINER_NAME="inveniem/nextcloud-fpm:latest" - SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" cd "${SCRIPT_DIR}" source '../../config.env' +CONTAINER_VERSION="${CONTAINER_VERSION:-latest}" +CONTAINER_NAME="inveniem/nextcloud-fpm:${CONTAINER_VERSION}" + ../nextcloud-common/generate_nr_setup_command.sh docker build -t "${CONTAINER_NAME}" -f Dockerfile .. diff --git a/nextcloud-aks/docker/middle-nextcloud-nginx/publish.sh b/nextcloud-aks/docker/middle-nextcloud-nginx/publish.sh index eeb87be..3a13e2f 100755 --- a/nextcloud-aks/docker/middle-nextcloud-nginx/publish.sh +++ b/nextcloud-aks/docker/middle-nextcloud-nginx/publish.sh @@ -12,13 +12,14 @@ set -e set -u -CONTAINER_NAME="inveniem/nextcloud-nginx-middleware:latest" - SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" cd "${SCRIPT_DIR}" source '../../config.env' +CONTAINER_VERSION="${CONTAINER_VERSION:-latest}" +CONTAINER_NAME="inveniem/nextcloud-nginx-middleware:${CONTAINER_VERSION}" + docker build -t "${CONTAINER_NAME}" . docker tag "${CONTAINER_NAME}" "${REGISTRY_HOST}/${CONTAINER_NAME}"