From ba52fedd275ff35b39aa36339db90dff3428e58a Mon Sep 17 00:00:00 2001 From: Ben Vincent Date: Tue, 28 Apr 2026 23:46:06 +1000 Subject: [PATCH] chore: restructure examples into single-file and conf.d-method subdirs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit examples/single-file/remotes.yaml — original monolithic config examples/conf.d-method/ — one yaml per remote (alpine, github, pypi) docker-compose updated to mount from examples/single-file/. --- docker-compose.yml | 2 +- examples/conf.d-method/alpine.yaml | 11 +++++++++++ examples/conf.d-method/github.yaml | 12 ++++++++++++ examples/conf.d-method/pypi.yaml | 17 +++++++++++++++++ examples/{ => single-file}/remotes.yaml | 0 5 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 examples/conf.d-method/alpine.yaml create mode 100644 examples/conf.d-method/github.yaml create mode 100644 examples/conf.d-method/pypi.yaml rename examples/{ => single-file}/remotes.yaml (100%) diff --git a/docker-compose.yml b/docker-compose.yml index a5eca7d..cf69e36 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,7 +10,7 @@ services: ports: - "8000:8000" volumes: - - ./examples/remotes.yaml:/app/remotes.yaml:ro,z + - ./examples/single-file/remotes.yaml:/app/remotes.yaml:ro,z - ./ca-bundle.pem:/app/ca-bundle.pem:ro,z environment: - CONFIG_PATH=/app/remotes.yaml diff --git a/examples/conf.d-method/alpine.yaml b/examples/conf.d-method/alpine.yaml new file mode 100644 index 0000000..a8e12f7 --- /dev/null +++ b/examples/conf.d-method/alpine.yaml @@ -0,0 +1,11 @@ +remotes: + alpine: + base_url: "https://dl-cdn.alpinelinux.org" + type: "remote" + package: "alpine" + description: "Alpine Linux APK package repository" + immutable_patterns: + - ".*/x86_64/.*\\.apk$" + cache: + immutable_ttl: 0 + mutable_ttl: 7200 diff --git a/examples/conf.d-method/github.yaml b/examples/conf.d-method/github.yaml new file mode 100644 index 0000000..51aa20a --- /dev/null +++ b/examples/conf.d-method/github.yaml @@ -0,0 +1,12 @@ +remotes: + github: + base_url: "https://github.com" + type: "remote" + package: "generic" + description: "GitHub releases and files" + immutable_patterns: + - "gruntwork-io/terragrunt/.*terragrunt_linux_amd64.*" + - "prometheus/node_exporter/.*/node_exporter-.*\\.linux-amd64\\.tar\\.gz$" + cache: + immutable_ttl: 0 + mutable_ttl: 0 diff --git a/examples/conf.d-method/pypi.yaml b/examples/conf.d-method/pypi.yaml new file mode 100644 index 0000000..4de0058 --- /dev/null +++ b/examples/conf.d-method/pypi.yaml @@ -0,0 +1,17 @@ +remotes: + pypi: + base_url: "https://files.pythonhosted.org" + type: "remote" + package: "pypi" + description: "Python Package Index" + check_mutable_updates: true + quarantine_new: true + quarantine_days: 3 + immutable_patterns: + - "packages/.*\\.whl$" + - "packages/.*\\.whl\\.metadata$" + - "packages/.*\\.tar\\.gz$" + - "packages/.*\\.zip$" + cache: + immutable_ttl: 0 + mutable_ttl: 600 diff --git a/examples/remotes.yaml b/examples/single-file/remotes.yaml similarity index 100% rename from examples/remotes.yaml rename to examples/single-file/remotes.yaml