From 42068805200af7610e03d0027dca4e8eea077042 Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Tue, 2 Mar 2021 10:04:01 +0100 Subject: [PATCH] new: [searx] add charm Signed-off-by: Valentin Lab --- searx/hooks/web_proxy-relation-joined | 12 ++++++++++++ searx/metadata.yml | 16 ++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100755 searx/hooks/web_proxy-relation-joined create mode 100644 searx/metadata.yml diff --git a/searx/hooks/web_proxy-relation-joined b/searx/hooks/web_proxy-relation-joined new file mode 100755 index 0000000..20c0c91 --- /dev/null +++ b/searx/hooks/web_proxy-relation-joined @@ -0,0 +1,12 @@ +#!/bin/bash + +set -e + +URL=$(relation-get url) || exit 1 + +config-add "\ +services: + $MASTER_BASE_SERVICE_NAME: + environment: + BASE_URL: $URL +" diff --git a/searx/metadata.yml b/searx/metadata.yml new file mode 100644 index 0000000..ce183af --- /dev/null +++ b/searx/metadata.yml @@ -0,0 +1,16 @@ +docker-image: docker.0k.io/searx:0.18.0-237 ## from: searx/searx:0.18.0-237-e2fb5008 +config-resources: + - /etc/searx + +default-options: + +uses: + web-proxy: + #constraint: required | recommended | optional + #auto: pair | summon | none ## default: pair + constraint: recommended + auto: pair + solves: + proxy: "Public access" + default-options: + target: !var-expand ${MASTER_BASE_SERVICE_NAME}:8080