496d3cbd68
Added deploy directory for spinning up container via docker-compose Added publish directory for publishing arm/amd images to docker hub Various tweeks to the source scripts Added test directory for easier testing of scripts and images
29 lines
No EOL
1.1 KiB
Text
Executable file
29 lines
No EOL
1.1 KiB
Text
Executable file
SDIR=$(dirname "$(realpath "$BASH_SOURCE")")
|
|
build=${UDBUILD:-$(command -v udbuild)}
|
|
if [[ $build ]];then
|
|
# by sourcing the build script and then calling the build function udbuild
|
|
# the build script environment will be availabe in this script
|
|
source $build
|
|
udbuild load_env_file $@
|
|
udbuild build_src
|
|
echo caddy build source at $BUILD_SRC
|
|
if [[ $BUILD_CADDY_CONF ]]; then
|
|
CONF_DIR=${CONF_DIR:-${PWD}/conf}
|
|
if [[ -d $CONF_DIR ]]; then
|
|
mkdir -p ${BUILD_SRC}/init/caddy/conf
|
|
echo adding caddy conf/ directory $CONF_DIR to build
|
|
ls -la $CONF_DIR
|
|
/bin/cp -R $CONF_DIR/. ${BUILD_SRC}/init/caddy/conf
|
|
fi
|
|
fi
|
|
BUILD_PKGS=${BUILD_PKGS:-${PWD}/caddy.pkgs}
|
|
if [[ -f $BUILD_PKGS ]]; then
|
|
echo adding caddy packages at $BUILD_PKGS to build
|
|
/bin/cp $BUILD_PKGS ${BUILD_SRC}/init/caddy.pkgs
|
|
fi
|
|
udbuild "$@"
|
|
rm -rf ${BUILD_SRC}/init/caddy/conf/
|
|
rm -f ${BUILD_SRC}/init/caddy.pkgs
|
|
else
|
|
echo can not find UCI Docker Build script, run ./install from the uci-docker-build repo
|
|
fi |