diff --git a/.github/workflows/container-build.yml b/.github/workflows/container-build.yml index d38d96bc2..031353c05 100644 --- a/.github/workflows/container-build.yml +++ b/.github/workflows/container-build.yml @@ -63,10 +63,10 @@ jobs: SSH_IP: ${{ secrets.ARM_SSH_IP }} SSH_CONFIG: ${{ secrets.ARM_SSH_CONFIG }} - name: Setup Buildx - uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0 + uses: docker/setup-buildx-action@4fd812986e6c8c2a69e18311145f9371337f27d4 # v3.4.0 if: inputs.CACHE_SUFFIX != 'arm' - name: Setup Buildx (ARM) - uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0 + uses: docker/setup-buildx-action@4fd812986e6c8c2a69e18311145f9371337f27d4 # v3.4.0 if: inputs.CACHE_SUFFIX == 'arm' with: endpoint: ssh://root@arm @@ -92,7 +92,7 @@ jobs: # Build cached image - name: Build image if: inputs.CACHE == true - uses: docker/build-push-action@15560696de535e4014efeff63c48f16952e52dd1 # v6.2.0 + uses: docker/build-push-action@1a162644f9a7e87d8f4b053101d1d9a712edc18c # v6.3.0 with: context: . file: ${{ inputs.DOCKERFILE }} @@ -105,7 +105,7 @@ jobs: # Build non-cached image - name: Build image if: inputs.CACHE != true - uses: docker/build-push-action@15560696de535e4014efeff63c48f16952e52dd1 # v6.2.0 + uses: docker/build-push-action@1a162644f9a7e87d8f4b053101d1d9a712edc18c # v6.3.0 with: context: . file: ${{ inputs.DOCKERFILE }} diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml index f5f5dfdfe..fbc55b7e8 100644 --- a/.github/workflows/linux-build.yml +++ b/.github/workflows/linux-build.yml @@ -72,10 +72,10 @@ jobs: SSH_IP: ${{ secrets.ARM_SSH_IP }} SSH_CONFIG: ${{ secrets.ARM_SSH_CONFIG }} - name: Setup Buildx - uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0 + uses: docker/setup-buildx-action@4fd812986e6c8c2a69e18311145f9371337f27d4 # v3.4.0 if: startsWith(env.ARCH, 'arm') == false - name: Setup Buildx (ARM) - uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0 + uses: docker/setup-buildx-action@4fd812986e6c8c2a69e18311145f9371337f27d4 # v3.4.0 if: startsWith(env.ARCH, 'arm') == true with: endpoint: ssh://root@arm @@ -94,7 +94,7 @@ jobs: # Build testing package image - name: Build package image if: inputs.RELEASE == 'testing' || inputs.RELEASE == 'dev' || inputs.RELEASE == 'ui' - uses: docker/build-push-action@15560696de535e4014efeff63c48f16952e52dd1 # v6.2.0 + uses: docker/build-push-action@1a162644f9a7e87d8f4b053101d1d9a712edc18c # v6.3.0 with: context: . load: true @@ -106,7 +106,7 @@ jobs: # Build non-testing package image - name: Build package image if: inputs.RELEASE != 'testing' && inputs.RELEASE != 'dev' - uses: docker/build-push-action@15560696de535e4014efeff63c48f16952e52dd1 # v6.2.0 + uses: docker/build-push-action@1a162644f9a7e87d8f4b053101d1d9a712edc18c # v6.3.0 with: context: . load: true @@ -142,7 +142,7 @@ jobs: images: ghcr.io/bunkerity/${{ inputs.LINUX }}-tests:${{ inputs.RELEASE }} - name: Build test image if: inputs.TEST == true - uses: docker/build-push-action@15560696de535e4014efeff63c48f16952e52dd1 # v6.2.0 + uses: docker/build-push-action@1a162644f9a7e87d8f4b053101d1d9a712edc18c # v6.3.0 with: context: . file: tests/linux/Dockerfile-${{ inputs.LINUX }} diff --git a/.github/workflows/push-docker.yml b/.github/workflows/push-docker.yml index fca9206e6..94b87bab8 100644 --- a/.github/workflows/push-docker.yml +++ b/.github/workflows/push-docker.yml @@ -58,7 +58,7 @@ jobs: SSH_IP: ${{ secrets.ARM_SSH_IP }} SSH_CONFIG: ${{ secrets.ARM_SSH_CONFIG }} - name: Setup Buildx (ARM) - uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0 + uses: docker/setup-buildx-action@4fd812986e6c8c2a69e18311145f9371337f27d4 # v3.4.0 with: endpoint: ssh://root@arm platforms: linux/arm64,linux/arm/v7,linux/arm/v6 @@ -70,7 +70,7 @@ jobs: images: bunkerity/${{ inputs.IMAGE }} # Build and push - name: Build and push - uses: docker/build-push-action@15560696de535e4014efeff63c48f16952e52dd1 # v6.2.0 + uses: docker/build-push-action@1a162644f9a7e87d8f4b053101d1d9a712edc18c # v6.3.0 with: context: . file: ${{ inputs.DOCKERFILE }} diff --git a/.github/workflows/push-packagecloud.yml b/.github/workflows/push-packagecloud.yml index dcb9fe049..98410ac95 100644 --- a/.github/workflows/push-packagecloud.yml +++ b/.github/workflows/push-packagecloud.yml @@ -42,7 +42,7 @@ jobs: - name: Check out repository code uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - name: Install ruby - uses: ruby/setup-ruby@1d0e911f615a112e322369596f10ee0b95b010ae # v1.183.0 + uses: ruby/setup-ruby@97e35c5302afcf3f5ac1df3fca9343d32536b286 # v1.184.0 with: ruby-version: "3.0" - name: Install packagecloud diff --git a/src/autoconf/Config.py b/src/autoconf/Config.py index c1970e1c0..c617e231d 100644 --- a/src/autoconf/Config.py +++ b/src/autoconf/Config.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 from contextlib import suppress +from itertools import chain from os import getenv from time import sleep from copy import deepcopy @@ -40,16 +41,22 @@ class Config: self._settings.update(plugin["settings"]) def __get_full_env(self) -> dict: + env_instances = {"SERVER_NAME": ""} + for instance in self.__instances: + for variable, value in instance["env"].items(): + env_instances[variable] = value + config = {"SERVER_NAME": "", "MULTISITE": "yes"} for service in self.__services: server_name = service["SERVER_NAME"].split(" ")[0] if not server_name: continue - for variable, value in service.items(): + for variable, value in chain(env_instances.items(), service.items()): if variable.startswith("CUSTOM_CONF") or not variable.isupper(): continue if not self._db.is_setting(variable, multisite=True): - self.__logger.warning(f"Variable {variable}: {value} is not a valid multisite setting, ignoring it") + if variable in service: + self.__logger.warning(f"Variable {variable}: {value} is not a valid multisite setting, ignoring it") continue config[f"{server_name}_{variable}"] = value config["SERVER_NAME"] += f" {server_name}" diff --git a/src/linux/Dockerfile-rhel b/src/linux/Dockerfile-rhel index 68cf98e48..12d89d814 100644 --- a/src/linux/Dockerfile-rhel +++ b/src/linux/Dockerfile-rhel @@ -1,4 +1,4 @@ -FROM redhat/ubi8:8.10@sha256:143123d85045df426c5bbafc6863659880ebe276eb02c77ee868b88d08dbd05d AS builder +FROM redhat/ubi8:8.10@sha256:44d75007b39e0e1bbf1bcfd0721245add54c54c3f83903f8926fb4bef6827aa2 AS builder ENV OS=rhel ENV NGINX_VERSION=1.26.1 @@ -65,7 +65,7 @@ COPY src/scheduler scheduler COPY src/ui ui COPY src/VERSION VERSION -FROM redhat/ubi8:8.10@sha256:143123d85045df426c5bbafc6863659880ebe276eb02c77ee868b88d08dbd05d +FROM redhat/ubi8:8.10@sha256:44d75007b39e0e1bbf1bcfd0721245add54c54c3f83903f8926fb4bef6827aa2 # Set default umask to prevent huge recursive chmod increasing the final image size RUN umask 027 diff --git a/tests/linux/Dockerfile-rhel b/tests/linux/Dockerfile-rhel index 6f2db32cb..3d52619a2 100644 --- a/tests/linux/Dockerfile-rhel +++ b/tests/linux/Dockerfile-rhel @@ -1,4 +1,4 @@ -FROM redhat/ubi8-init:8.10-2.1717585302@sha256:0a87a84de9b4fe211a0623cf7b1431895c9c6590d345e20bb5483f09629d53d3 +FROM redhat/ubi8-init:8.10-4@sha256:df22b959e8966c7ef9000cbf89f0bda0440b59902e88e344ea3678912f49286d ENV NGINX_VERSION 1.26.1