diff --git a/.woodpecker/coredns-build.yaml b/.woodpecker/build-images.yaml similarity index 69% rename from .woodpecker/coredns-build.yaml rename to .woodpecker/build-images.yaml index 225e3f8..a0a38af 100644 --- a/.woodpecker/coredns-build.yaml +++ b/.woodpecker/build-images.yaml @@ -3,6 +3,7 @@ when: path: include: - mikrotik/coredns/** + - docker/** steps: - name: Get registry creds from OpenBao @@ -21,7 +22,7 @@ steps: - 'printf "PLUGIN_USERNAME=%s\n" "$(bao kv get -mount secret -field REGISTRY_USERNAME container-registry)" > /woodpecker/registry.env' - 'printf "PLUGIN_PASSWORD=%s\n" "$(bao kv get -mount secret -field REGISTRY_PASSWORD container-registry)" >> /woodpecker/registry.env' - - name: Build and push + - name: Build and push mikrotik coredns image: woodpeckerci/plugin-docker-buildx:6.1.1 privileged: true settings: @@ -34,6 +35,24 @@ steps: dockerfile: mikrotik/coredns/Dockerfile context: mikrotik/coredns/ env_file: /woodpecker/registry.env + cache_images: + - gitea.lumpiasty.xyz/lumpiasty/coredns-mikrotik:buildcache + + - name: Build and push llama-swap-supervisord + image: woodpeckerci/plugin-docker-buildx:6.1.1 + privileged: true + settings: + registry: gitea.lumpiasty.xyz + repo: gitea.lumpiasty.xyz/lumpiasty/supervisord + platforms: linux/arm64 + tags: + - latest + - ${CI_COMMIT_SHA:0:8} + dockerfile: docker/supervisord/Dockerfile + context: docker/supervisord/ + env_file: /woodpecker/registry.env + cache_images: + - gitea.lumpiasty.xyz/lumpiasty/supervisord:buildcache - name: Invalidate OpenBao token image: quay.io/openbao/openbao:2.5.5 diff --git a/docker/supervisord/Dockerfile b/docker/supervisord/Dockerfile new file mode 100644 index 0000000..f5166cd --- /dev/null +++ b/docker/supervisord/Dockerfile @@ -0,0 +1,11 @@ +FROM debian:13.5 + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt update && apt install -y --no-install-recommends\ + supervisor \ + && rm -rf /var/lib/apt/lists/* + +ADD --chmod=755 entrypoint.sh / + +ENTRYPOINT ["/entrypoint.sh"] \ No newline at end of file diff --git a/docker/supervisord/entrypoint.sh b/docker/supervisord/entrypoint.sh new file mode 100644 index 0000000..de554e8 --- /dev/null +++ b/docker/supervisord/entrypoint.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +WORKSPACE=/workspace +CONF=$WORKSPACE/supervisord.conf + +[[ -f "$CONF" ]] || (echo_supervisord_conf > $CONF ) + +exec supervisord -n -c $CONF "$@"