diff --git a/deploy/example.env b/deploy/example.env new file mode 100644 index 0000000..1dcdd4a --- /dev/null +++ b/deploy/example.env @@ -0,0 +1,7 @@ +# copy to .env and edit to suit +COMPOSE_PROJECT_NAME=mydoc +# default NAME is caddy +NAME=$COMPOSE_PROJECT_NAME +DOC_NAME=$NAME +# to use a deployed image +IMAGE=ucommandit/doc \ No newline at end of file diff --git a/src/init/build.env b/src/init/build.env new file mode 100644 index 0000000..5bc2e6a --- /dev/null +++ b/src/init/build.env @@ -0,0 +1,3 @@ +export BUILD_NAME=doc +[ -f "$ENV_DIR/run.env" ] && source $ENV_DIR/run.env +echo $USER set diff --git a/src/rootfs/opt/env/caddy.env b/src/rootfs/opt/env/caddy.env new file mode 100644 index 0000000..5552df1 --- /dev/null +++ b/src/rootfs/opt/env/caddy.env @@ -0,0 +1,6 @@ +export CADDY_HOME=${CADDY_HOME:-/opt/caddy} +export XDG_CONFIG_HOME=$CADDY_HOME/settings +export XDG_DATA_HOME=$CADDY_HOME/data +export CADDY_CONF=$CADDY_HOME/conf +export CADDY_BIN=/usr/sbin/caddy +export CADDY_LIB=$LIB_DIR/caddy.lib \ No newline at end of file diff --git a/src/rootfs/opt/env/editor.env b/src/rootfs/opt/env/editor.env new file mode 100644 index 0000000..916ff24 --- /dev/null +++ b/src/rootfs/opt/env/editor.env @@ -0,0 +1,8 @@ +export EDITOR_HOME=/opt/editor +export EDITOR_REP0=coder/code-server +export EDITOR_SRC=/usr/local/lib/code-server +export EDITOR_BIN=$EDITOR_SRC/bin/code-server +export EDITOR_CONFIG_TMPL=$DOC_HOME/editor/editor.tmpl.yml +export EDITOR_CONFIG=$EDITOR_HOME/editor.yml +export EDITOR_EXTENSIONS=$DOC_HOME/editor/extensions +export EDITOR_DATA=$DOC_HOME/editor/data \ No newline at end of file diff --git a/src/rootfs/opt/env/run.env b/src/rootfs/opt/env/run.env new file mode 100644 index 0000000..b5de6e6 --- /dev/null +++ b/src/rootfs/opt/env/run.env @@ -0,0 +1,11 @@ +# will be sourced when "login" action is run via /etc/profile +# set these to customize the "custom" entrypoint command +export ENTRYPOINT_CMD=doc +export ENTRYPOINT_CMD_PATH=$BIN_DIR/doc +export USER=doc +export DOC_HOME=/doc +export DEFAULT_DIR=$DOC_HOME +export DOC_NAME=${DOC_NAME:-"Doc name set with DOC_NAME"} +source $ENV_DIR/runit.env +source $ENV_DIR/caddy.env +source $ENV_DIR/editor.env \ No newline at end of file diff --git a/src/rootfs/opt/env/runit.env b/src/rootfs/opt/env/runit.env new file mode 100644 index 0000000..efa5195 --- /dev/null +++ b/src/rootfs/opt/env/runit.env @@ -0,0 +1 @@ +export SVDIR=/opt/services \ No newline at end of file