From c52867afdd5001118f2d2ded631b5a178f0c125d Mon Sep 17 00:00:00 2001 From: David Kebler Date: Tue, 4 Apr 2023 07:01:45 -0700 Subject: [PATCH] remove .env caddy conf and scripts --- .env | 12 ------------ conf/Caddyfile | 13 ------------- conf/caddy.pkgs | 3 --- src/init/opt/caddy/conf/Caddyfile | 13 ------------- src/init/opt/caddy/conf/caddy.pkgs | 3 --- src/init/opt/caddy/conf/seldon.conf | 13 ------------- src/init/opt/scripts/entrypoint.sh | 6 ------ src/init/opt/scripts/getarch.sh | 17 ----------------- src/init/opt/scripts/github.lib | 29 ----------------------------- src/init/opt/scripts/start.sh | 15 --------------- 10 files changed, 124 deletions(-) delete mode 100644 .env delete mode 100644 conf/Caddyfile delete mode 100755 conf/caddy.pkgs delete mode 100644 src/init/opt/caddy/conf/Caddyfile delete mode 100755 src/init/opt/caddy/conf/caddy.pkgs delete mode 100644 src/init/opt/caddy/conf/seldon.conf delete mode 100755 src/init/opt/scripts/entrypoint.sh delete mode 100755 src/init/opt/scripts/getarch.sh delete mode 100644 src/init/opt/scripts/github.lib delete mode 100755 src/init/opt/scripts/start.sh diff --git a/.env b/.env deleted file mode 100644 index 6a04c23..0000000 --- a/.env +++ /dev/null @@ -1,12 +0,0 @@ -# creditials required for route 53, this is package specific -# CREDENTIALS=/data/secure/aws-credentials.env -# will use Caddyfile unless CONF is set -# CONF=seldon -# default NAME is caddy -# NAME=caddy -# Will use dockerhub official base alpine image unless used here -# BASE_IMAGE=ucommandit/alpine -# will find src/ but setting this will speed it up -# BUILD_SRC=./src -# version is latest unless used here -# TAG=2.1.5 diff --git a/conf/Caddyfile b/conf/Caddyfile deleted file mode 100644 index 30d5a92..0000000 --- a/conf/Caddyfile +++ /dev/null @@ -1,13 +0,0 @@ -*.mydomain.net { - - tls email@gmail.com { - dns route53 { - max_retries 10 - } - } - - @portainerr host docker.mydomain.net - handle @portainer { - reverse_proxy 10.0.0.5:9000 - } -} \ No newline at end of file diff --git a/conf/caddy.pkgs b/conf/caddy.pkgs deleted file mode 100755 index ac02fb7..0000000 --- a/conf/caddy.pkgs +++ /dev/null @@ -1,3 +0,0 @@ -github.com/caddy-dns/route53 -# comment lines are ignored thus a way to disable a package on build -# github.com/greenpau/caddy-security diff --git a/src/init/opt/caddy/conf/Caddyfile b/src/init/opt/caddy/conf/Caddyfile deleted file mode 100644 index 30d5a92..0000000 --- a/src/init/opt/caddy/conf/Caddyfile +++ /dev/null @@ -1,13 +0,0 @@ -*.mydomain.net { - - tls email@gmail.com { - dns route53 { - max_retries 10 - } - } - - @portainerr host docker.mydomain.net - handle @portainer { - reverse_proxy 10.0.0.5:9000 - } -} \ No newline at end of file diff --git a/src/init/opt/caddy/conf/caddy.pkgs b/src/init/opt/caddy/conf/caddy.pkgs deleted file mode 100755 index ac02fb7..0000000 --- a/src/init/opt/caddy/conf/caddy.pkgs +++ /dev/null @@ -1,3 +0,0 @@ -github.com/caddy-dns/route53 -# comment lines are ignored thus a way to disable a package on build -# github.com/greenpau/caddy-security diff --git a/src/init/opt/caddy/conf/seldon.conf b/src/init/opt/caddy/conf/seldon.conf deleted file mode 100644 index 4d6e6a0..0000000 --- a/src/init/opt/caddy/conf/seldon.conf +++ /dev/null @@ -1,13 +0,0 @@ -*.seldon.kebler.net { - - tls kebler.net@gmail.com { - dns route53 { - max_retries 10 - } - } - - @docker host docker.seldon.kebler.net - handle @docker { - reverse_proxy seldon.kebler.net:9016 - } -} diff --git a/src/init/opt/scripts/entrypoint.sh b/src/init/opt/scripts/entrypoint.sh deleted file mode 100755 index 4270156..0000000 --- a/src/init/opt/scripts/entrypoint.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -export SCRIPTS_DIR="$(dirname $(realpath "${BASH_SOURCE:-$0}"))" -# echo arguments in entry $@ -# execute the start script in a login shell so that the uci shell will be sourced -# see https://stackoverflow.com/a/1711985/4695378 passing $@ -/bin/bash -l -c '${SCRIPTS_DIR}/start.sh $@' $0 "$@" diff --git a/src/init/opt/scripts/getarch.sh b/src/init/opt/scripts/getarch.sh deleted file mode 100755 index 3e35b56..0000000 --- a/src/init/opt/scripts/getarch.sh +++ /dev/null @@ -1,17 +0,0 @@ -get_arch () { - local apkArch="$(apk --print-arch)" - case "$apkArch" in - x86_64) binArch='amd64' ;; - armhf) binArch='armv6' ;; - armv7) binArch='armv7' ;; - aarch64) binArch='arm64' ;; - ppc64el|ppc64le) binArch='ppc64le' ;; - s390x) binArch='s390x';; - *) return 1 ;;\ - esac; - echo $binArch -} - -(return 0 2>/dev/null) || get_arch $@ - - diff --git a/src/init/opt/scripts/github.lib b/src/init/opt/scripts/github.lib deleted file mode 100644 index cc4148b..0000000 --- a/src/init/opt/scripts/github.lib +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -export GITHUB_REPOS=https://api.github.com/repos - -github_latest() { - local endpoint=$GITHUB_REPOS/$1/$2/releases/latest - local auth; local res - [[ $GITHUB_TOKEN ]] && auth="-u $GITHUB_USER:$GITHUB_TOKEN" - if ! res=$(curl $auth -s $endpoint); then - return 1 - fi - echo $res| jq .name -r -} - -github_asset () { -# user repo version asset - -asset_url=$(curl -s "$GITHUB_REPOS/$1/$2/releases/tags/v$3" \ - | jq --arg aname "$4" -r '.assets[] | select(.name == $aname).browser_download_url' \ - | head -1) - -if [ -z "${asset_url}" ]; then - return 1 -fi - -echo $asset_url - -} - diff --git a/src/init/opt/scripts/start.sh b/src/init/opt/scripts/start.sh deleted file mode 100755 index adcb09a..0000000 --- a/src/init/opt/scripts/start.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -# echo arguments in start script: "$@" -source /opt/caddy/caddy.env -case "$1" in - shell) - /bin/bash -c "cd $CADDY_HOME; exec bash -l" - ;; - run) - shift 1 - $CADDY_BIN run --config $CADDY_CONF/$1 --adapter caddyfile - ;; - *) - $CADDY_BIN/caddy "$@" - -esac \ No newline at end of file