mirror of
https://github.com/casjaysdevdocker/jekyll
synced 2025-12-08 02:52:16 -05:00
🗃️ Updated Dockerfile* and .env.scripts* 🗃️
Some checks failed
release-tag / release-image (push) Failing after 1m5s
Some checks failed
release-tag / release-image (push) Failing after 1m5s
Dockerfile .env.scripts .gitattributes .gitea/workflows/docker.yaml .gitignore LICENSE.md README.md rootfs/root/docker/setup/00-init.sh rootfs/root/docker/setup/01-system.sh rootfs/root/docker/setup/02-packages.sh rootfs/root/docker/setup/03-files.sh rootfs/root/docker/setup/04-users.sh rootfs/root/docker/setup/05-custom.sh rootfs/root/docker/setup/06-post.sh rootfs/root/docker/setup/07-cleanup.sh rootfs/usr/local/bin/copy rootfs/usr/local/bin/entrypoint.sh rootfs/usr/local/bin/pkmgr rootfs/usr/local/bin/symlink rootfs/usr/local/etc/docker/functions/entrypoint.sh rootfs/usr/local/share/template-files/config/env/default.sample rootfs/usr/local/share/template-files/config/env/examples/00-directory.sh rootfs/usr/local/share/template-files/config/env/examples/addresses.sh rootfs/usr/local/share/template-files/config/env/examples/certbot.sh rootfs/usr/local/share/template-files/config/env/examples/couchdb.sh rootfs/usr/local/share/template-files/config/env/examples/dockerd.sh rootfs/usr/local/share/template-files/config/env/examples/global.sh rootfs/usr/local/share/template-files/config/env/examples/healthcheck.sh rootfs/usr/local/share/template-files/config/env/examples/mariadb.sh rootfs/usr/local/share/template-files/config/env/examples/mongodb.sh rootfs/usr/local/share/template-files/config/env/examples/networking.sh rootfs/usr/local/share/template-files/config/env/examples/other.sh rootfs/usr/local/share/template-files/config/env/examples/php.sh rootfs/usr/local/share/template-files/config/env/examples/postgres.sh rootfs/usr/local/share/template-files/config/env/examples/redis.sh rootfs/usr/local/share/template-files/config/env/examples/services.sh rootfs/usr/local/share/template-files/config/env/examples/ssl.sh rootfs/usr/local/share/template-files/config/env/examples/supabase.sh rootfs/usr/local/share/template-files/config/env/examples/webservers.sh rootfs/usr/local/share/template-files/config/env/examples/zz-entrypoint.sh
This commit is contained in:
47
.env.scripts
47
.env.scripts
@@ -1,15 +1,24 @@
|
|||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
##@Version : 202509161148-git
|
##@Version : 202511291200-git
|
||||||
# @@Author : CasjaysDev
|
# @@Author : CasjaysDev
|
||||||
# @@Contact : CasjaysDev <docker-admin@casjaysdev.pro>
|
# @@Contact : CasjaysDev <docker-admin@casjaysdev.pro>
|
||||||
# @@License : MIT
|
# @@License : MIT
|
||||||
# @@Copyright : Copyright 2025 CasjaysDev
|
# @@Copyright : Copyright 2025 CasjaysDev
|
||||||
# @@Created : Tue Sep 16 11:48:05 AM EDT 2025
|
# @@Created : Fri Nov 29 12:00:00 PM EST 2025
|
||||||
# @@File : .env.scripts
|
# @@File : .env.scripts
|
||||||
# @@Description : Variables for gen-dockerfile and buildx scripts
|
# @@Description : Variables for gen-dockerfile and buildx scripts
|
||||||
|
# @@Changelog : newScript
|
||||||
|
# @@TODO : Refactor code
|
||||||
|
# @@Other : N/A
|
||||||
|
# @@Resource : N/A
|
||||||
|
# @@Terminal App : yes
|
||||||
|
# @@sudo/root : yes
|
||||||
|
# @@Template : templates/dockerfiles/dotenv.template
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# shellcheck disable=SC1001,SC1003,SC2001,SC2003,SC2016,SC2031,SC2120,SC2155,SC2199,SC2317,SC2329
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# entrypoint Settings
|
# entrypoint Settings
|
||||||
DOCKER_ENTYPOINT_PORTS_WEB="${DOCKER_ENTYPOINT_PORTS_WEB}"
|
DOCKER_ENTYPOINT_PORTS_WEB="${DOCKER_ENTYPOINT_PORTS_WEB:-4000}"
|
||||||
DOCKER_ENTYPOINT_PORTS_SRV="${DOCKER_ENTYPOINT_PORTS_SRV}"
|
DOCKER_ENTYPOINT_PORTS_SRV="${DOCKER_ENTYPOINT_PORTS_SRV}"
|
||||||
DOCKER_ENTYPOINT_HEALTH_APPS="$DOCKER_ENTYPOINT_HEALTH_APPS"
|
DOCKER_ENTYPOINT_HEALTH_APPS="$DOCKER_ENTYPOINT_HEALTH_APPS"
|
||||||
DOCKER_ENTYPOINT_HEALTH_ENDPOINTS="$DOCKER_ENTYPOINT_HEALTH_ENDPOINTS"
|
DOCKER_ENTYPOINT_HEALTH_ENDPOINTS="$DOCKER_ENTYPOINT_HEALTH_ENDPOINTS"
|
||||||
@@ -20,29 +29,33 @@ ENV_IMAGE_NAME="jekyll"
|
|||||||
ENV_USE_TEMPLATE="alpine"
|
ENV_USE_TEMPLATE="alpine"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Maintainer info
|
# Maintainer info
|
||||||
ENV_ORG_NAME="casjaysdevdocker"
|
ENV_ORG_NAME="casjaysdev"
|
||||||
ENV_VENDOR="CasjaysDev"
|
ENV_VENDOR="CasjaysDev"
|
||||||
ENV_AUTHOR="CasjaysDev"
|
ENV_AUTHOR="CasjaysDev"
|
||||||
ENV_MAINTAINER="CasjaysDev <docker-admin@casjaysdev.pro>"
|
ENV_MAINTAINER="CasjaysDev <docker-admin@casjaysdev.pro>"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# REPO info
|
# Repository URLs (Full URLs)
|
||||||
ENV_GIT_REPO_URL="https://github.com/casjaysdevdocker/jekyll"
|
ENV_GIT_REPO_URL="https://github.com/casjaysdev/jekyll"
|
||||||
ENV_REGISTRY_URL="docker.io"
|
ENV_REGISTRY_URL="docker.io/casjaysdev/jekyll"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Push image info
|
# Push Configuration
|
||||||
ENV_IMAGE_PUSH="casjaysdevdocker/jekyll"
|
ENV_IMAGE_PUSH="casjaysdev/jekyll"
|
||||||
ENV_IMAGE_TAG="latest"
|
ENV_IMAGE_TAG="latest"
|
||||||
ENV_ADD_TAGS="2.7"
|
ENV_ADD_TAGS="USE_DATE"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Additional push destinations (if needed)
|
||||||
ENV_ADD_IMAGE_PUSH=""
|
ENV_ADD_IMAGE_PUSH=""
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Pull image info
|
# Pull Configuration
|
||||||
ENV_PULL_URL="casjaysdev/alpine"
|
ENV_PULL_URL="ruby"
|
||||||
ENV_DISTRO_TAG="3.14"
|
ENV_DISTRO_TAG="3.3-alpine"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Env
|
# Env
|
||||||
SERVICE_PORT="80"
|
SERVICE_PORT="4000"
|
||||||
EXPOSE_PORTS="80"
|
EXPOSE_PORTS="4000"
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# IF using a lanuage such as go, php, rust, ruby, etc set the version here.
|
||||||
|
LANG_VERSION="latest"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Versions
|
# Versions
|
||||||
PHP_VERSION="system"
|
PHP_VERSION="system"
|
||||||
@@ -56,5 +69,7 @@ DEFAULT_DATA_DIR="/usr/local/share/template-files/data"
|
|||||||
DEFAULT_CONF_DIR="/usr/local/share/template-files/config"
|
DEFAULT_CONF_DIR="/usr/local/share/template-files/config"
|
||||||
DEFAULT_TEMPLATE_DIR="/usr/local/share/template-files/defaults"
|
DEFAULT_TEMPLATE_DIR="/usr/local/share/template-files/defaults"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
ENV_PACKAGES=""
|
ENV_PACKAGES="bash-completion git curl wget sudo unzip iproute2 ssmtp openssl jq tzdata mailcap ncurses util-linux pciutils usbutils coreutils binutils findutils grep rsync zip tini py3-pip procps net-tools coreutils sed gawk grep attr findutils readline lsof less curl shadow certbot ca-certificates build-base ruby-dev"
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# ex: ts=2 sw=2 et filetype=sh
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|||||||
2
.gitattributes
vendored
2
.gitattributes
vendored
@@ -1,4 +1,4 @@
|
|||||||
# Template generated on Thu Sep 4 10:41:50 PM EDT 2025 from https://github.com/alexkaratarakis/gitattributes"
|
# Template generated on Tue Sep 16 08:42:38 PM EDT 2025 from https://github.com/alexkaratarakis/gitattributes"
|
||||||
# Common settings that generally should always be used with your language specific settings
|
# Common settings that generally should always be used with your language specific settings
|
||||||
# Auto detect text files and perform LF normalization
|
# Auto detect text files and perform LF normalization
|
||||||
* text=auto
|
* text=auto
|
||||||
|
|||||||
@@ -46,7 +46,6 @@ jobs:
|
|||||||
linux/amd64
|
linux/amd64
|
||||||
linux/arm64
|
linux/arm64
|
||||||
push: true
|
push: true
|
||||||
tags: | # replace it with your local IP and tags
|
tags: |
|
||||||
${{ steps.meta.outputs.DOCKER_HUB }}/${{ steps.meta.outputs.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.DATE_TAG }}
|
${{ steps.meta.outputs.DOCKER_HUB }}/${{ steps.meta.outputs.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.DATE_TAG }}
|
||||||
${{ steps.meta.outputs.DOCKER_HUB }}/${{ steps.meta.outputs.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.DOCKER_TAG }}
|
${{ steps.meta.outputs.DOCKER_HUB }}/${{ steps.meta.outputs.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.DOCKER_TAG }}
|
||||||
|
|
||||||
|
|||||||
16
.gitignore
vendored
16
.gitignore
vendored
@@ -1,4 +1,4 @@
|
|||||||
# gitignore created on 05/22/25 at 21:00
|
# gitignore created on 09/20/25 at 05:14
|
||||||
# Disable reminder in prompt
|
# Disable reminder in prompt
|
||||||
ignoredirmessage
|
ignoredirmessage
|
||||||
|
|
||||||
@@ -83,6 +83,7 @@ $RECYCLE.BIN/
|
|||||||
# ignore .build_failed files
|
# ignore .build_failed files
|
||||||
**/.build_failed*
|
**/.build_failed*
|
||||||
|
|
||||||
|
|
||||||
# ignore .bak files
|
# ignore .bak files
|
||||||
**/*.bak
|
**/*.bak
|
||||||
|
|
||||||
@@ -99,17 +100,4 @@ $RECYCLE.BIN/
|
|||||||
**/*.rewrite.sh
|
**/*.rewrite.sh
|
||||||
**/*.refactor.sh
|
**/*.refactor.sh
|
||||||
|
|
||||||
# ignore dotenv files
|
|
||||||
.env
|
|
||||||
|
|
||||||
# Ignore the file: app.env
|
|
||||||
app.env
|
|
||||||
|
|
||||||
# Ignore the file: compose.default.yaml
|
|
||||||
compose.default.yaml
|
|
||||||
# ignore the default dotenv file
|
|
||||||
default.env
|
|
||||||
|
|
||||||
# Exclude compose.yaml just in case it has sensitive data
|
|
||||||
compose.yaml
|
|
||||||
|
|
||||||
|
|||||||
62
Dockerfile
62
Dockerfile
@@ -1,7 +1,8 @@
|
|||||||
|
# syntax=docker/dockerfile:1
|
||||||
# Docker image for jekyll using the alpine template
|
# Docker image for jekyll using the alpine template
|
||||||
ARG IMAGE_NAME="jekyll"
|
ARG IMAGE_NAME="jekyll"
|
||||||
ARG PHP_SERVER="jekyll"
|
ARG PHP_SERVER="jekyll"
|
||||||
ARG BUILD_DATE="202509161148"
|
ARG BUILD_DATE="202408111050"
|
||||||
ARG LANGUAGE="en_US.UTF-8"
|
ARG LANGUAGE="en_US.UTF-8"
|
||||||
ARG TIMEZONE="America/New_York"
|
ARG TIMEZONE="America/New_York"
|
||||||
ARG WWW_ROOT_DIR="/usr/local/share/httpd/default"
|
ARG WWW_ROOT_DIR="/usr/local/share/httpd/default"
|
||||||
@@ -9,23 +10,23 @@ ARG DEFAULT_FILE_DIR="/usr/local/share/template-files"
|
|||||||
ARG DEFAULT_DATA_DIR="/usr/local/share/template-files/data"
|
ARG DEFAULT_DATA_DIR="/usr/local/share/template-files/data"
|
||||||
ARG DEFAULT_CONF_DIR="/usr/local/share/template-files/config"
|
ARG DEFAULT_CONF_DIR="/usr/local/share/template-files/config"
|
||||||
ARG DEFAULT_TEMPLATE_DIR="/usr/local/share/template-files/defaults"
|
ARG DEFAULT_TEMPLATE_DIR="/usr/local/share/template-files/defaults"
|
||||||
ARG PATH="/usr/local/etc/docker/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
|
||||||
|
|
||||||
ARG USER="root"
|
ARG USER="root"
|
||||||
ARG SHELL_OPTS="set -e -o pipefail"
|
ARG SHELL_OPTS="set -e -o pipefail"
|
||||||
|
|
||||||
ARG SERVICE_PORT="80"
|
ARG SERVICE_PORT="4000"
|
||||||
ARG EXPOSE_PORTS="80"
|
ARG EXPOSE_PORTS="4000"
|
||||||
|
ARG LANG_VERSION="latest"
|
||||||
ARG PHP_VERSION="system"
|
ARG PHP_VERSION="system"
|
||||||
ARG NODE_VERSION="system"
|
ARG NODE_VERSION="system"
|
||||||
ARG NODE_MANAGER="system"
|
ARG NODE_MANAGER="system"
|
||||||
|
|
||||||
ARG IMAGE_REPO="casjaysdevdocker/jekyll"
|
ARG IMAGE_REPO="casjaysdev/jekyll"
|
||||||
ARG IMAGE_VERSION="latest"
|
ARG IMAGE_VERSION="latest"
|
||||||
ARG CONTAINER_VERSION="2.7"
|
ARG CONTAINER_VERSION="USE_DATE"
|
||||||
|
|
||||||
ARG PULL_URL="casjaysdev/alpine"
|
ARG PULL_URL="ruby"
|
||||||
ARG DISTRO_VERSION="3.14"
|
ARG DISTRO_VERSION="3.3-alpine"
|
||||||
ARG BUILD_VERSION="${BUILD_DATE}"
|
ARG BUILD_VERSION="${BUILD_DATE}"
|
||||||
|
|
||||||
FROM tianon/gosu:latest AS gosu
|
FROM tianon/gosu:latest AS gosu
|
||||||
@@ -52,31 +53,31 @@ ARG NODE_MANAGER
|
|||||||
ARG PHP_VERSION
|
ARG PHP_VERSION
|
||||||
ARG PHP_SERVER
|
ARG PHP_SERVER
|
||||||
ARG SHELL_OPTS
|
ARG SHELL_OPTS
|
||||||
ARG PATH
|
|
||||||
|
|
||||||
ARG PACK_LIST=" "
|
ARG PACK_LIST="bash-completion git curl wget sudo unzip iproute2 ssmtp openssl jq tzdata mailcap ncurses util-linux pciutils usbutils coreutils binutils findutils grep rsync zip tini py3-pip procps net-tools coreutils sed gawk grep attr findutils readline lsof less curl shadow certbot ca-certificates build-base ruby-dev "
|
||||||
|
|
||||||
ENV ENV=~/.profile
|
ENV ENV=~/.profile
|
||||||
ENV SHELL="/bin/sh"
|
ENV SHELL="/bin/sh"
|
||||||
ENV PATH="${PATH}"
|
|
||||||
ENV TZ="${TIMEZONE}"
|
ENV TZ="${TIMEZONE}"
|
||||||
ENV TIMEZONE="${TZ}"
|
ENV TIMEZONE="${TZ}"
|
||||||
ENV LANG="${LANGUAGE}"
|
ENV LANG="${LANGUAGE}"
|
||||||
ENV TERM="xterm-256color"
|
ENV TERM="xterm-256color"
|
||||||
ENV HOSTNAME="casjaysdevdocker-jekyll"
|
ENV HOSTNAME="casjaysdev-jekyll"
|
||||||
|
|
||||||
USER ${USER}
|
USER ${USER}
|
||||||
WORKDIR /root
|
WORKDIR /root
|
||||||
|
|
||||||
COPY ./rootfs/usr/local/bin/. /usr/local/bin/
|
COPY ./rootfs/usr/local/bin/. /usr/local/bin/
|
||||||
|
|
||||||
RUN set -e; \
|
|
||||||
echo "Updating the system and ensuring bash is installed"; \
|
|
||||||
pkmgr update;pkmgr install bash
|
|
||||||
|
|
||||||
RUN set -e; \
|
RUN set -e; \
|
||||||
echo "Setting up prerequisites"; \
|
echo "Setting up prerequisites"; \
|
||||||
true
|
apk --no-cache add bash; \
|
||||||
|
SH_CMD="$(which sh 2>/dev/null||command -v sh 2>/dev/null)"; \
|
||||||
|
BASH_CMD="$(which bash 2>/dev/null||command -v bash 2>/dev/null)"; \
|
||||||
|
[ -x "$BASH_CMD" ] && /usr/local/bin/symlink "$BASH_CMD" "/bin/sh" || true; \
|
||||||
|
[ -x "$BASH_CMD" ] && /usr/local/bin/symlink "$BASH_CMD" "/usr/bin/sh" || true; \
|
||||||
|
[ -x "$BASH_CMD" ] && [ "$SH_CMD" != "/bin/sh" ] && /usr/local/bin/symlink "$BASH_CMD" "$SH_CMD" || true; \
|
||||||
|
[ -n "$BASH_CMD" ] && sed -i 's|root:x:.*|root:x:0:0:root:/root:'$BASH_CMD'|g' "/etc/passwd" || true
|
||||||
|
|
||||||
ENV SHELL="/bin/bash"
|
ENV SHELL="/bin/bash"
|
||||||
SHELL [ "/bin/bash", "-c" ]
|
SHELL [ "/bin/bash", "-c" ]
|
||||||
@@ -91,7 +92,11 @@ RUN echo "Initializing the system"; \
|
|||||||
|
|
||||||
RUN echo "Creating and editing system files "; \
|
RUN echo "Creating and editing system files "; \
|
||||||
$SHELL_OPTS; \
|
$SHELL_OPTS; \
|
||||||
[ -f "/root/.profile" ] || touch "/root/.profile"; \
|
rm -Rf "/etc/apk/repositories"; \
|
||||||
|
[ "$DISTRO_VERSION" = "latest" ] && DISTRO_VERSION="edge";[ "$DISTRO_VERSION" = "edge" ] || DISTRO_VERSION="v${DISTRO_VERSION}"; \
|
||||||
|
echo "http://dl-cdn.alpinelinux.org/alpine/${DISTRO_VERSION}/main" >>"/etc/apk/repositories"; \
|
||||||
|
echo "http://dl-cdn.alpinelinux.org/alpine/${DISTRO_VERSION}/community" >>"/etc/apk/repositories"; \
|
||||||
|
if [ "${DISTRO_VERSION}" = "edge" ]; then echo "http://dl-cdn.alpinelinux.org/alpine/${DISTRO_VERSION}/testing" >>"/etc/apk/repositories";fi; \
|
||||||
if [ -f "/root/docker/setup/01-system.sh" ];then echo "Running the system script";/root/docker/setup/01-system.sh||{ echo "Failed to execute /root/docker/setup/01-system.sh" >&2 && exit 10; };echo "Done running the system script";fi; \
|
if [ -f "/root/docker/setup/01-system.sh" ];then echo "Running the system script";/root/docker/setup/01-system.sh||{ echo "Failed to execute /root/docker/setup/01-system.sh" >&2 && exit 10; };echo "Done running the system script";fi; \
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
@@ -128,7 +133,7 @@ RUN echo "Updating system files "; \
|
|||||||
[ -n "$PHP_FPM" ] && [ -z "$(command -v php-fpm 2>/dev/null)" ] && ln -sf "$PHP_FPM" "/usr/bin/php-fpm" 2>/dev/null || true; \
|
[ -n "$PHP_FPM" ] && [ -z "$(command -v php-fpm 2>/dev/null)" ] && ln -sf "$PHP_FPM" "/usr/bin/php-fpm" 2>/dev/null || true; \
|
||||||
if [ -f "/etc/profile.d/color_prompt.sh.disabled" ]; then mv -f "/etc/profile.d/color_prompt.sh.disabled" "/etc/profile.d/color_prompt.sh";fi ; \
|
if [ -f "/etc/profile.d/color_prompt.sh.disabled" ]; then mv -f "/etc/profile.d/color_prompt.sh.disabled" "/etc/profile.d/color_prompt.sh";fi ; \
|
||||||
{ [ -f "/etc/bash/bashrc" ] && cp -Rf "/etc/bash/bashrc" "/root/.bashrc"; } || { [ -f "/etc/bashrc" ] && cp -Rf "/etc/bashrc" "/root/.bashrc"; } || { [ -f "/etc/bash.bashrc" ] && cp -Rf "/etc/bash.bashrc" "/root/.bashrc"; } || true; \
|
{ [ -f "/etc/bash/bashrc" ] && cp -Rf "/etc/bash/bashrc" "/root/.bashrc"; } || { [ -f "/etc/bashrc" ] && cp -Rf "/etc/bashrc" "/root/.bashrc"; } || { [ -f "/etc/bash.bashrc" ] && cp -Rf "/etc/bash.bashrc" "/root/.bashrc"; } || true; \
|
||||||
if [ -z "$(command -v "apt-get" 2>/dev/null)" ];then grep -sh -q 'alias quit' "/root/.bashrc" || printf '# Profile\n\n%s\n%s\n%s\n' '. /etc/profile' '. /root/.profile' "alias quit='exit 0 2>/dev/null'" >>"/root/.bashrc"; fi; \
|
if [ -z "$(command -v "apt-get" 2>/dev/null)" ];then grep -s -q 'alias quit' "/root/.bashrc" || printf '# Profile\n\n%s\n%s\n%s\n' '. /etc/profile' '. /root/.profile' "alias quit='exit 0 2>/dev/null'" >>"/root/.bashrc"; fi; \
|
||||||
if [ "$PHP_VERSION" != "system" ] && [ -e "/etc/php" ] && [ -d "/etc/${PHP_VERSION}" ];then rm -Rf "/etc/php";fi; \
|
if [ "$PHP_VERSION" != "system" ] && [ -e "/etc/php" ] && [ -d "/etc/${PHP_VERSION}" ];then rm -Rf "/etc/php";fi; \
|
||||||
if [ "$PHP_VERSION" != "system" ] && [ -n "${PHP_VERSION}" ] && [ -d "/etc/${PHP_VERSION}" ];then ln -sf "/etc/${PHP_VERSION}" "/etc/php";fi; \
|
if [ "$PHP_VERSION" != "system" ] && [ -n "${PHP_VERSION}" ] && [ -d "/etc/${PHP_VERSION}" ];then ln -sf "/etc/${PHP_VERSION}" "/etc/php";fi; \
|
||||||
if [ -f "/root/docker/setup/03-files.sh" ];then echo "Running the files script";/root/docker/setup/03-files.sh||{ echo "Failed to execute /root/docker/setup/03-files.sh" >&2 && exit 10; };echo "Done running the files script";fi; \
|
if [ -f "/root/docker/setup/03-files.sh" ];then echo "Running the files script";/root/docker/setup/03-files.sh||{ echo "Failed to execute /root/docker/setup/03-files.sh" >&2 && exit 10; };echo "Done running the files script";fi; \
|
||||||
@@ -183,7 +188,6 @@ RUN echo "Deleting unneeded files"; \
|
|||||||
RUN echo "Init done"
|
RUN echo "Init done"
|
||||||
FROM scratch
|
FROM scratch
|
||||||
ARG TZ
|
ARG TZ
|
||||||
ARG PATH
|
|
||||||
ARG USER
|
ARG USER
|
||||||
ARG TIMEZONE
|
ARG TIMEZONE
|
||||||
ARG LANGUAGE
|
ARG LANGUAGE
|
||||||
@@ -204,14 +208,14 @@ ARG NODE_MANAGER
|
|||||||
ARG PHP_VERSION
|
ARG PHP_VERSION
|
||||||
ARG PHP_SERVER
|
ARG PHP_SERVER
|
||||||
ARG LICENSE="WTFPL"
|
ARG LICENSE="WTFPL"
|
||||||
ARG ENV_PORTS="${EXPOSE_PORTS}"
|
ARG ENV_PORTS=""
|
||||||
|
|
||||||
USER ${USER}
|
USER ${USER}
|
||||||
WORKDIR /root
|
WORKDIR /root
|
||||||
|
|
||||||
LABEL maintainer="CasjaysDev <docker-admin@casjaysdev.pro>"
|
LABEL maintainer="CasjaysDev <docker-admin@casjaysdev.pro>"
|
||||||
LABEL org.opencontainers.image.vendor="CasjaysDev"
|
LABEL org.opencontainers.image.vendor="CasjaysDev"
|
||||||
LABEL org.opencontainers.image.authors="CasjaysDev"
|
LABEL org.opencontainers.image.authors="CasjaysDev <docker-admin@casjaysdev.pro"
|
||||||
LABEL org.opencontainers.image.description="Containerized version of ${IMAGE_NAME}"
|
LABEL org.opencontainers.image.description="Containerized version of ${IMAGE_NAME}"
|
||||||
LABEL org.opencontainers.image.title="${IMAGE_NAME}"
|
LABEL org.opencontainers.image.title="${IMAGE_NAME}"
|
||||||
LABEL org.opencontainers.image.base.name="${IMAGE_NAME}"
|
LABEL org.opencontainers.image.base.name="${IMAGE_NAME}"
|
||||||
@@ -219,19 +223,18 @@ LABEL org.opencontainers.image.authors="${LICENSE}"
|
|||||||
LABEL org.opencontainers.image.created="${BUILD_DATE}"
|
LABEL org.opencontainers.image.created="${BUILD_DATE}"
|
||||||
LABEL org.opencontainers.image.version="${BUILD_VERSION}"
|
LABEL org.opencontainers.image.version="${BUILD_VERSION}"
|
||||||
LABEL org.opencontainers.image.schema-version="${BUILD_VERSION}"
|
LABEL org.opencontainers.image.schema-version="${BUILD_VERSION}"
|
||||||
LABEL org.opencontainers.image.url="docker.io"
|
LABEL org.opencontainers.image.url="https://hub.docker.com/r/casjaysdev/jekyll"
|
||||||
LABEL org.opencontainers.image.source="docker.io"
|
LABEL org.opencontainers.image.source="https://hub.docker.com/r/casjaysdev/jekyll"
|
||||||
LABEL org.opencontainers.image.vcs-type="Git"
|
LABEL org.opencontainers.image.vcs-type="Git"
|
||||||
LABEL org.opencontainers.image.revision="${BUILD_VERSION}"
|
LABEL org.opencontainers.image.revision="${BUILD_VERSION}"
|
||||||
LABEL org.opencontainers.image.source="https://github.com/casjaysdevdocker/jekyll"
|
LABEL org.opencontainers.image.source="https://github.com/casjaysdev/jekyll"
|
||||||
LABEL org.opencontainers.image.documentation="https://github.com/casjaysdevdocker/jekyll"
|
LABEL org.opencontainers.image.documentation="https://github.com/casjaysdev/jekyll"
|
||||||
LABEL com.github.containers.toolbox="false"
|
LABEL com.github.containers.toolbox="false"
|
||||||
|
|
||||||
ENV ENV=~/.bashrc
|
ENV ENV=~/.bashrc
|
||||||
ENV USER="${USER}"
|
ENV USER="${USER}"
|
||||||
ENV PATH="${PATH}"
|
|
||||||
ENV TZ="${TIMEZONE}"
|
|
||||||
ENV SHELL="/bin/bash"
|
ENV SHELL="/bin/bash"
|
||||||
|
ENV TZ="${TIMEZONE}"
|
||||||
ENV TIMEZONE="${TZ}"
|
ENV TIMEZONE="${TZ}"
|
||||||
ENV LANG="${LANGUAGE}"
|
ENV LANG="${LANGUAGE}"
|
||||||
ENV TERM="xterm-256color"
|
ENV TERM="xterm-256color"
|
||||||
@@ -252,5 +255,6 @@ VOLUME [ "/config","/data" ]
|
|||||||
|
|
||||||
EXPOSE ${SERVICE_PORT} ${ENV_PORTS}
|
EXPOSE ${SERVICE_PORT} ${ENV_PORTS}
|
||||||
|
|
||||||
ENTRYPOINT [ "tini","--","/usr/local/bin/entrypoint.sh", "start" ]
|
CMD [ "tail", "-f", "/dev/null" ]
|
||||||
|
ENTRYPOINT [ "tini","--","/usr/local/bin/entrypoint.sh" ]
|
||||||
HEALTHCHECK --start-period=10m --interval=5m --timeout=15s CMD [ "/usr/local/bin/entrypoint.sh", "healthcheck" ]
|
HEALTHCHECK --start-period=10m --interval=5m --timeout=15s CMD [ "/usr/local/bin/entrypoint.sh", "healthcheck" ]
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||||
Version 2, December 2004
|
Version 2, December 2004
|
||||||
|
|
||||||
Copyright (C) 2023 casjay <git-admin@casjaysdev.pro>
|
Copyright (C) 2024 casjay <git-admin@casjaysdev.pro>
|
||||||
|
|
||||||
Everyone is permitted to copy and distribute verbatim or modified
|
Everyone is permitted to copy and distribute verbatim or modified
|
||||||
copies of this license document, and changing it is allowed as long
|
copies of this license document, and changing it is allowed as long
|
||||||
|
|||||||
137
README.md
137
README.md
@@ -1,78 +1,73 @@
|
|||||||
## 👋 Welcome to jekyll 🚀
|
# Jekyll Docker Container with GitHub Pages Support
|
||||||
|
|
||||||
jekyll README
|
Docker container for Jekyll static site generator with full GitHub Pages support.
|
||||||
|
|
||||||
|
|
||||||
## Install my system scripts
|
|
||||||
|
|
||||||
```shell
|
## Features
|
||||||
sudo bash -c "$(curl -q -LSsf "https://github.com/systemmgr/installer/raw/main/install.sh")"
|
|
||||||
sudo systemmgr --config && sudo systemmgr install scripts
|
- Based on Ruby 3.3 Alpine
|
||||||
```
|
- Jekyll with latest stable version
|
||||||
|
- Full GitHub Pages gem support
|
||||||
## Automatic install/update
|
- Bundler for dependency management
|
||||||
|
- WEBrick for local serving
|
||||||
```shell
|
- Multi-architecture support (amd64, arm64)
|
||||||
dockermgr update jekyll
|
|
||||||
```
|
## Usage
|
||||||
|
|
||||||
## Install and run container
|
### Run Jekyll Server
|
||||||
|
|
||||||
```shell
|
```bash
|
||||||
mkdir -p "$HOME/.local/share/srv/docker/jekyll/rootfs"
|
|
||||||
git clone "https://github.com/dockermgr/jekyll" "$HOME/.local/share/CasjaysDev/dockermgr/jekyll"
|
|
||||||
cp -Rfva "$HOME/.local/share/CasjaysDev/dockermgr/jekyll/rootfs/." "$HOME/.local/share/srv/docker/jekyll/rootfs/"
|
|
||||||
docker run -d \
|
docker run -d \
|
||||||
--restart always \
|
-p 4000:4000 \
|
||||||
--privileged \
|
-v $(pwd):/srv/jekyll \
|
||||||
--name casjaysdevdocker-jekyll \
|
casjaysdevdocker/jekyll
|
||||||
--hostname jekyll \
|
|
||||||
-e TZ=${TIMEZONE:-America/New_York} \
|
|
||||||
-v "$HOME/.local/share/srv/docker/casjaysdevdocker-jekyll/rootfs/data:/data:z" \
|
|
||||||
-v "$HOME/.local/share/srv/docker/casjaysdevdocker-jekyll/rootfs/config:/config:z" \
|
|
||||||
-p 80:80 \
|
|
||||||
casjaysdevdocker/jekyll:latest
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## via docker-compose
|
### Create New Site
|
||||||
|
|
||||||
```yaml
|
```bash
|
||||||
version: "2"
|
docker run --rm \
|
||||||
services:
|
-v $(pwd):/srv/jekyll \
|
||||||
ProjectName:
|
casjaysdevdocker/jekyll \
|
||||||
image: casjaysdevdocker/jekyll
|
jekyll new my-site
|
||||||
container_name: casjaysdevdocker-jekyll
|
|
||||||
environment:
|
|
||||||
- TZ=America/New_York
|
|
||||||
- HOSTNAME=jekyll
|
|
||||||
volumes:
|
|
||||||
- "$HOME/.local/share/srv/docker/casjaysdevdocker-jekyll/rootfs/data:/data:z"
|
|
||||||
- "$HOME/.local/share/srv/docker/casjaysdevdocker-jekyll/rootfs/config:/config:z"
|
|
||||||
ports:
|
|
||||||
- 80:80
|
|
||||||
restart: always
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Get source files
|
### Build Site
|
||||||
|
|
||||||
```shell
|
```bash
|
||||||
dockermgr download src casjaysdevdocker/jekyll
|
docker run --rm \
|
||||||
|
-v $(pwd):/srv/jekyll \
|
||||||
|
casjaysdevdocker/jekyll \
|
||||||
|
jekyll build
|
||||||
```
|
```
|
||||||
|
|
||||||
OR
|
### Serve with Live Reload
|
||||||
|
|
||||||
```shell
|
```bash
|
||||||
git clone "https://github.com/casjaysdevdocker/jekyll" "$HOME/Projects/github/casjaysdevdocker/jekyll"
|
docker run -d \
|
||||||
|
-p 4000:4000 \
|
||||||
|
-v $(pwd):/srv/jekyll \
|
||||||
|
casjaysdevdocker/jekyll \
|
||||||
|
jekyll serve --host 0.0.0.0 --livereload
|
||||||
```
|
```
|
||||||
|
|
||||||
## Build container
|
## Environment Variables
|
||||||
|
|
||||||
```shell
|
- `LANG_VERSION` - Jekyll version (default: latest)
|
||||||
cd "$HOME/Projects/github/casjaysdevdocker/jekyll"
|
- `SERVICE_PORT` - Port to expose (default: 4000)
|
||||||
buildx
|
|
||||||
```
|
## Volumes
|
||||||
|
|
||||||
## Authors
|
- `/srv/jekyll` - Jekyll site directory
|
||||||
|
- `/usr/local/share/template-files` - Template files
|
||||||
🤖 casjay: [Github](https://github.com/casjay) 🤖
|
|
||||||
⛵ casjaysdevdocker: [Github](https://github.com/casjaysdevdocker) [Docker](https://hub.docker.com/u/casjaysdevdocker) ⛵
|
## Ports
|
||||||
|
|
||||||
|
- `4000` - Jekyll development server
|
||||||
|
|
||||||
|
## GitHub Pages
|
||||||
|
|
||||||
|
This container includes the `github-pages` gem which ensures compatibility with GitHub Pages deployment.
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
MIT - CasjaysDev
|
||||||
|
|||||||
@@ -1,40 +1,44 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# shellcheck shell=bash
|
||||||
##@Version : 202509161145-git
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
##@Version : 202510221732-git
|
||||||
# @@Author : CasjaysDev
|
# @@Author : CasjaysDev
|
||||||
# @@Contact : CasjaysDev <docker-admin@casjaysdev.pro>
|
# @@Contact : CasjaysDev <docker-admin@casjaysdev.pro>
|
||||||
# @@License : MIT
|
# @@License : MIT
|
||||||
# @@ReadME :
|
# @@Copyright : Copyright 2025 CasjaysDev
|
||||||
# @@Copyright : Copyright 2023 CasjaysDev
|
# @@Created : Wed Oct 22 05:32:01 PM EDT 2025
|
||||||
# @@Created : Mon Aug 28 06:48:42 PM EDT 2023
|
|
||||||
# @@File : 00-init.sh
|
# @@File : 00-init.sh
|
||||||
# @@Description : script to run init
|
# @@Description : script to run init
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# @@Changelog : newScript
|
||||||
# shellcheck shell=bash
|
# @@TODO : Refactor code
|
||||||
# shellcheck disable=SC2016
|
# @@Other : N/A
|
||||||
# shellcheck disable=SC2031
|
# @@Resource : N/A
|
||||||
# shellcheck disable=SC2120
|
# @@Terminal App : yes
|
||||||
# shellcheck disable=SC2155
|
# @@sudo/root : yes
|
||||||
# shellcheck disable=SC2199
|
# @@Template : templates/dockerfiles/init_scripts/00-init.sh
|
||||||
# shellcheck disable=SC2317
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# shellcheck disable=SC1001,SC1003,SC2001,SC2003,SC2016,SC2031,SC2120,SC2155,SC2199,SC2317,SC2329
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Set bash options
|
# Set bash options
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
[ "$DEBUGGER" = "on" ] && echo "Enabling debugging" && set -x$DEBUGGER_OPTIONS
|
[ "$DEBUGGER" = "on" ] && echo "Enabling debugging" && set -x$DEBUGGER_OPTIONS
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Set env variables
|
# Set env variables
|
||||||
exitCode=0
|
exitCode=0
|
||||||
|
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Predefined actions
|
# Predefined actions
|
||||||
if [ -d "/usr/local/share/template-files/data" ]; then rm -Rf "/usr/local/share/template-files/data"/*; fi
|
if [ -d "/usr/local/share/template-files/data" ]; then rm -Rf "/usr/local/share/template-files/data"/*; fi
|
||||||
if [ -d "/usr/local/share/template-files/config" ]; then rm -Rf "/usr/local/share/template-files/config"/*; fi
|
if [ -d "/usr/local/share/template-files/config" ]; then rm -Rf "/usr/local/share/template-files/config"/*; fi
|
||||||
if [ -d "/usr/local/share/template-files/defaults" ]; then rm -Rf "/usr/local/share/template-files/defaults"/*; fi
|
if [ -d "/usr/local/share/template-files/defaults" ]; then rm -Rf "/usr/local/share/template-files/defaults"/*; fi
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Main script
|
# Main script
|
||||||
|
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Set the exit code
|
# Set the exit code
|
||||||
#exitCode=$?
|
#exitCode=$?
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
exit $exitCode
|
exit $exitCode
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# ex: ts=2 sw=2 et filetype=sh
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|||||||
@@ -1,38 +1,42 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# shellcheck shell=bash
|
||||||
##@Version : 202509161145-git
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
##@Version : 202510221732-git
|
||||||
# @@Author : CasjaysDev
|
# @@Author : CasjaysDev
|
||||||
# @@Contact : CasjaysDev <docker-admin@casjaysdev.pro>
|
# @@Contact : CasjaysDev <docker-admin@casjaysdev.pro>
|
||||||
# @@License : MIT
|
# @@License : MIT
|
||||||
# @@ReadME :
|
# @@Copyright : Copyright 2025 CasjaysDev
|
||||||
# @@Copyright : Copyright 2023 CasjaysDev
|
# @@Created : Wed Oct 22 05:32:01 PM EDT 2025
|
||||||
# @@Created : Mon Aug 28 06:48:42 PM EDT 2023
|
|
||||||
# @@File : 01-system.sh
|
# @@File : 01-system.sh
|
||||||
# @@Description : script to run system
|
# @@Description : script to run system
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# @@Changelog : newScript
|
||||||
# shellcheck shell=bash
|
# @@TODO : Refactor code
|
||||||
# shellcheck disable=SC2016
|
# @@Other : N/A
|
||||||
# shellcheck disable=SC2031
|
# @@Resource : N/A
|
||||||
# shellcheck disable=SC2120
|
# @@Terminal App : yes
|
||||||
# shellcheck disable=SC2155
|
# @@sudo/root : yes
|
||||||
# shellcheck disable=SC2199
|
# @@Template : templates/dockerfiles/init_scripts/01-system.sh
|
||||||
# shellcheck disable=SC2317
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# shellcheck disable=SC1001,SC1003,SC2001,SC2003,SC2016,SC2031,SC2120,SC2155,SC2199,SC2317,SC2329
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Set bash options
|
# Set bash options
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
[ "$DEBUGGER" = "on" ] && echo "Enabling debugging" && set -x$DEBUGGER_OPTIONS
|
[ "$DEBUGGER" = "on" ] && echo "Enabling debugging" && set -x$DEBUGGER_OPTIONS
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Set env variables
|
# Set env variables
|
||||||
exitCode=0
|
exitCode=0
|
||||||
|
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Predefined actions
|
# Predefined actions
|
||||||
|
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Main script
|
# Main script
|
||||||
|
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Set the exit code
|
# Set the exit code
|
||||||
#exitCode=$?
|
#exitCode=$?
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
exit $exitCode
|
exit $exitCode
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# ex: ts=2 sw=2 et filetype=sh
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|||||||
@@ -1,38 +1,42 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# shellcheck shell=bash
|
||||||
##@Version : 202509161145-git
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
##@Version : 202510221732-git
|
||||||
# @@Author : CasjaysDev
|
# @@Author : CasjaysDev
|
||||||
# @@Contact : CasjaysDev <docker-admin@casjaysdev.pro>
|
# @@Contact : CasjaysDev <docker-admin@casjaysdev.pro>
|
||||||
# @@License : MIT
|
# @@License : MIT
|
||||||
# @@ReadME :
|
# @@Copyright : Copyright 2025 CasjaysDev
|
||||||
# @@Copyright : Copyright 2023 CasjaysDev
|
# @@Created : Wed Oct 22 05:32:01 PM EDT 2025
|
||||||
# @@Created : Mon Aug 28 06:48:42 PM EDT 2023
|
|
||||||
# @@File : 02-packages.sh
|
# @@File : 02-packages.sh
|
||||||
# @@Description : script to run packages
|
# @@Description : script to run packages
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# @@Changelog : newScript
|
||||||
# shellcheck shell=bash
|
# @@TODO : Refactor code
|
||||||
# shellcheck disable=SC2016
|
# @@Other : N/A
|
||||||
# shellcheck disable=SC2031
|
# @@Resource : N/A
|
||||||
# shellcheck disable=SC2120
|
# @@Terminal App : yes
|
||||||
# shellcheck disable=SC2155
|
# @@sudo/root : yes
|
||||||
# shellcheck disable=SC2199
|
# @@Template : templates/dockerfiles/init_scripts/02-packages.sh
|
||||||
# shellcheck disable=SC2317
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# shellcheck disable=SC1001,SC1003,SC2001,SC2003,SC2016,SC2031,SC2120,SC2155,SC2199,SC2317,SC2329
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Set bash options
|
# Set bash options
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
[ "$DEBUGGER" = "on" ] && echo "Enabling debugging" && set -x$DEBUGGER_OPTIONS
|
[ "$DEBUGGER" = "on" ] && echo "Enabling debugging" && set -x$DEBUGGER_OPTIONS
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Set env variables
|
# Set env variables
|
||||||
exitCode=0
|
exitCode=0
|
||||||
|
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Predefined actions
|
# Predefined actions
|
||||||
|
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Main script
|
# Main script
|
||||||
|
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Set the exit code
|
# Set the exit code
|
||||||
#exitCode=$?
|
#exitCode=$?
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
exit $exitCode
|
exit $exitCode
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# ex: ts=2 sw=2 et filetype=sh
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|||||||
@@ -1,31 +1,32 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# shellcheck shell=bash
|
||||||
##@Version : 202408270903-git
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
##@Version : 202510221732-git
|
||||||
# @@Author : CasjaysDev
|
# @@Author : CasjaysDev
|
||||||
# @@Contact : CasjaysDev <docker-admin@casjaysdev.pro>
|
# @@Contact : CasjaysDev <docker-admin@casjaysdev.pro>
|
||||||
# @@License : MIT
|
# @@License : MIT
|
||||||
# @@ReadME :
|
# @@Copyright : Copyright 2025 CasjaysDev
|
||||||
# @@Copyright : Copyright 2023 CasjaysDev
|
# @@Created : Wed Oct 22 05:32:02 PM EDT 2025
|
||||||
# @@Created : Mon Aug 28 06:48:42 PM EDT 2023
|
|
||||||
# @@File : 03-files.sh
|
# @@File : 03-files.sh
|
||||||
# @@Description : script to run files
|
# @@Description : script to run files
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# @@Changelog : newScript
|
||||||
# shellcheck shell=bash
|
# @@TODO : Refactor code
|
||||||
# shellcheck disable=SC2016
|
# @@Other : N/A
|
||||||
# shellcheck disable=SC2031
|
# @@Resource : N/A
|
||||||
# shellcheck disable=SC2120
|
# @@Terminal App : yes
|
||||||
# shellcheck disable=SC2155
|
# @@sudo/root : yes
|
||||||
# shellcheck disable=SC2199
|
# @@Template : templates/dockerfiles/init_scripts/03-files.sh
|
||||||
# shellcheck disable=SC2317
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# shellcheck disable=SC1001,SC1003,SC2001,SC2003,SC2016,SC2031,SC2120,SC2155,SC2199,SC2317,SC2329
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Set bash options
|
# Set bash options
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
[ "$DEBUGGER" = "on" ] && echo "Enabling debugging" && set -x$DEBUGGER_OPTIONS
|
[ "$DEBUGGER" = "on" ] && echo "Enabling debugging" && set -x$DEBUGGER_OPTIONS
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Set env variables
|
# Set env variables
|
||||||
exitCode=0
|
exitCode=0
|
||||||
|
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Predefined actions
|
# Predefined actions
|
||||||
if [ -d "/tmp/bin" ]; then
|
if [ -d "/tmp/bin" ]; then
|
||||||
mkdir -p "/usr/local/bin"
|
mkdir -p "/usr/local/bin"
|
||||||
@@ -79,11 +80,14 @@ if [ -d "/tmp/data" ]; then
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
unset data
|
unset data
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Main script
|
# Main script
|
||||||
|
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Set the exit code
|
# Set the exit code
|
||||||
#exitCode=$?
|
#exitCode=$?
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
exit $exitCode
|
exit $exitCode
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# ex: ts=2 sw=2 et filetype=sh
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|||||||
@@ -1,38 +1,42 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# shellcheck shell=bash
|
||||||
##@Version : 202509161145-git
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
##@Version : 202510221732-git
|
||||||
# @@Author : CasjaysDev
|
# @@Author : CasjaysDev
|
||||||
# @@Contact : CasjaysDev <docker-admin@casjaysdev.pro>
|
# @@Contact : CasjaysDev <docker-admin@casjaysdev.pro>
|
||||||
# @@License : MIT
|
# @@License : MIT
|
||||||
# @@ReadME :
|
# @@Copyright : Copyright 2025 CasjaysDev
|
||||||
# @@Copyright : Copyright 2023 CasjaysDev
|
# @@Created : Wed Oct 22 05:32:02 PM EDT 2025
|
||||||
# @@Created : Mon Aug 28 06:48:42 PM EDT 2023
|
|
||||||
# @@File : 04-users.sh
|
# @@File : 04-users.sh
|
||||||
# @@Description : script to run users
|
# @@Description : script to run users
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# @@Changelog : newScript
|
||||||
# shellcheck shell=bash
|
# @@TODO : Refactor code
|
||||||
# shellcheck disable=SC2016
|
# @@Other : N/A
|
||||||
# shellcheck disable=SC2031
|
# @@Resource : N/A
|
||||||
# shellcheck disable=SC2120
|
# @@Terminal App : yes
|
||||||
# shellcheck disable=SC2155
|
# @@sudo/root : yes
|
||||||
# shellcheck disable=SC2199
|
# @@Template : templates/dockerfiles/init_scripts/04-users.sh
|
||||||
# shellcheck disable=SC2317
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# shellcheck disable=SC1001,SC1003,SC2001,SC2003,SC2016,SC2031,SC2120,SC2155,SC2199,SC2317,SC2329
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Set bash options
|
# Set bash options
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
[ "$DEBUGGER" = "on" ] && echo "Enabling debugging" && set -x$DEBUGGER_OPTIONS
|
[ "$DEBUGGER" = "on" ] && echo "Enabling debugging" && set -x$DEBUGGER_OPTIONS
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Set env variables
|
# Set env variables
|
||||||
exitCode=0
|
exitCode=0
|
||||||
|
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Predefined actions
|
# Predefined actions
|
||||||
|
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Main script
|
# Main script
|
||||||
|
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Set the exit code
|
# Set the exit code
|
||||||
#exitCode=$?
|
#exitCode=$?
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
exit $exitCode
|
exit $exitCode
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# ex: ts=2 sw=2 et filetype=sh
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
##@Version : 202509161145-git
|
##@Version : 202511291200-git
|
||||||
# @@Author : CasjaysDev
|
# @@Author : CasjaysDev
|
||||||
# @@Contact : CasjaysDev <docker-admin@casjaysdev.pro>
|
# @@Contact : CasjaysDev <docker-admin@casjaysdev.pro>
|
||||||
# @@License : MIT
|
# @@License : MIT
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
# @@Copyright : Copyright 2023 CasjaysDev
|
# @@Copyright : Copyright 2023 CasjaysDev
|
||||||
# @@Created : Mon Aug 28 06:48:42 PM EDT 2023
|
# @@Created : Mon Aug 28 06:48:42 PM EDT 2023
|
||||||
# @@File : 05-custom.sh
|
# @@File : 05-custom.sh
|
||||||
# @@Description : script to run custom
|
# @@Description : script to install Jekyll with GitHub Pages support
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
# shellcheck disable=SC2016
|
# shellcheck disable=SC2016
|
||||||
@@ -24,15 +24,38 @@ set -o pipefail
|
|||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Set env variables
|
# Set env variables
|
||||||
exitCode=0
|
exitCode=0
|
||||||
|
LANG_VERSION="${LANG_VERSION:-latest}"
|
||||||
|
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Predefined actions
|
# Predefined actions
|
||||||
|
echo "Installing Jekyll with GitHub Pages support"
|
||||||
|
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# Install Jekyll and GitHub Pages dependencies
|
||||||
# Main script
|
if [ "$LANG_VERSION" = "latest" ]; then
|
||||||
|
echo "Installing latest Jekyll with github-pages gem..."
|
||||||
|
gem install jekyll bundler github-pages webrick || exitCode=1
|
||||||
|
else
|
||||||
|
echo "Installing Jekyll version ${LANG_VERSION}..."
|
||||||
|
gem install jekyll:${LANG_VERSION} bundler github-pages webrick || exitCode=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Verify installation
|
||||||
|
if command -v jekyll >/dev/null 2>&1; then
|
||||||
|
echo "Jekyll installed successfully"
|
||||||
|
jekyll --version || exitCode=1
|
||||||
|
echo "Installed gems:"
|
||||||
|
gem list | grep -E "(jekyll|github-pages|bundler)" || true
|
||||||
|
else
|
||||||
|
echo "Jekyll installation failed" >&2
|
||||||
|
exitCode=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create default site directory
|
||||||
|
mkdir -p /srv/jekyll || exitCode=1
|
||||||
|
chown -R root:root /srv/jekyll || true
|
||||||
|
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Set the exit code
|
# Set the exit code
|
||||||
#exitCode=$?
|
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
||||||
exit $exitCode
|
exit $exitCode
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# ex: ts=2 sw=2 et filetype=sh
|
||||||
|
|||||||
@@ -1,38 +1,42 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# shellcheck shell=bash
|
||||||
##@Version : 202509161145-git
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
##@Version : 202510221732-git
|
||||||
# @@Author : CasjaysDev
|
# @@Author : CasjaysDev
|
||||||
# @@Contact : CasjaysDev <docker-admin@casjaysdev.pro>
|
# @@Contact : CasjaysDev <docker-admin@casjaysdev.pro>
|
||||||
# @@License : MIT
|
# @@License : MIT
|
||||||
# @@ReadME :
|
# @@Copyright : Copyright 2025 CasjaysDev
|
||||||
# @@Copyright : Copyright 2023 CasjaysDev
|
# @@Created : Wed Oct 22 05:32:02 PM EDT 2025
|
||||||
# @@Created : Mon Aug 28 06:48:42 PM EDT 2023
|
|
||||||
# @@File : 06-post.sh
|
# @@File : 06-post.sh
|
||||||
# @@Description : script to run post
|
# @@Description : script to run post
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# @@Changelog : newScript
|
||||||
# shellcheck shell=bash
|
# @@TODO : Refactor code
|
||||||
# shellcheck disable=SC2016
|
# @@Other : N/A
|
||||||
# shellcheck disable=SC2031
|
# @@Resource : N/A
|
||||||
# shellcheck disable=SC2120
|
# @@Terminal App : yes
|
||||||
# shellcheck disable=SC2155
|
# @@sudo/root : yes
|
||||||
# shellcheck disable=SC2199
|
# @@Template : templates/dockerfiles/init_scripts/06-post.sh
|
||||||
# shellcheck disable=SC2317
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# shellcheck disable=SC1001,SC1003,SC2001,SC2003,SC2016,SC2031,SC2120,SC2155,SC2199,SC2317,SC2329
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Set bash options
|
# Set bash options
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
[ "$DEBUGGER" = "on" ] && echo "Enabling debugging" && set -x$DEBUGGER_OPTIONS
|
[ "$DEBUGGER" = "on" ] && echo "Enabling debugging" && set -x$DEBUGGER_OPTIONS
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Set env variables
|
# Set env variables
|
||||||
exitCode=0
|
exitCode=0
|
||||||
|
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Predefined actions
|
# Predefined actions
|
||||||
|
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Main script
|
# Main script
|
||||||
|
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Set the exit code
|
# Set the exit code
|
||||||
#exitCode=$?
|
#exitCode=$?
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
exit $exitCode
|
exit $exitCode
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# ex: ts=2 sw=2 et filetype=sh
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|||||||
@@ -1,39 +1,46 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# shellcheck shell=bash
|
||||||
##@Version : 202509161145-git
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
##@Version : 202510221732-git
|
||||||
# @@Author : CasjaysDev
|
# @@Author : CasjaysDev
|
||||||
# @@Contact : CasjaysDev <docker-admin@casjaysdev.pro>
|
# @@Contact : CasjaysDev <docker-admin@casjaysdev.pro>
|
||||||
# @@License : MIT
|
# @@License : MIT
|
||||||
# @@ReadME :
|
# @@Copyright : Copyright 2025 CasjaysDev
|
||||||
# @@Copyright : Copyright 2023 CasjaysDev
|
# @@Created : Wed Oct 22 05:32:02 PM EDT 2025
|
||||||
# @@Created : Mon Aug 28 06:48:42 PM EDT 2023
|
|
||||||
# @@File : 07-cleanup.sh
|
# @@File : 07-cleanup.sh
|
||||||
# @@Description : script to run cleanup
|
# @@Description : script to run cleanup
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# @@Changelog : newScript
|
||||||
# shellcheck shell=bash
|
# @@TODO : Refactor code
|
||||||
# shellcheck disable=SC2016
|
# @@Other : N/A
|
||||||
# shellcheck disable=SC2031
|
# @@Resource : N/A
|
||||||
# shellcheck disable=SC2120
|
# @@Terminal App : yes
|
||||||
# shellcheck disable=SC2155
|
# @@sudo/root : yes
|
||||||
# shellcheck disable=SC2199
|
# @@Template : templates/dockerfiles/init_scripts/07-cleanup.sh
|
||||||
# shellcheck disable=SC2317
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# shellcheck disable=SC1001,SC1003,SC2001,SC2003,SC2016,SC2031,SC2120,SC2155,SC2199,SC2317,SC2329
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Set bash options
|
# Set bash options
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
[ "$DEBUGGER" = "on" ] && echo "Enabling debugging" && set -x$DEBUGGER_OPTIONS
|
[ "$DEBUGGER" = "on" ] && echo "Enabling debugging" && set -x$DEBUGGER_OPTIONS
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Load functions
|
||||||
|
__find_and_remove() { [ -z "$1" ] || find "${2:-/etc}" -iname "$1" -exec rm -Rf {} \; 2>/dev/null; }
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Set env variables
|
# Set env variables
|
||||||
exitCode=0
|
exitCode=0
|
||||||
|
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Predefined actions
|
# Predefined actions
|
||||||
if [ -d "/tmp" ]; then rm -Rf "/tmp"/*; fi
|
if [ -d "/tmp" ]; then rm -Rf "/tmp"/*; fi
|
||||||
if [ -d "$HOME/.cache" ]; then rm -Rf "$HOME/.cache"; fi
|
if [ -d "$HOME/.cache" ]; then rm -Rf "$HOME/.cache"; fi
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Main script
|
# Main script
|
||||||
|
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Set the exit code
|
# Set the exit code
|
||||||
#exitCode=$?
|
#exitCode=$?
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
exit $exitCode
|
exit $exitCode
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# ex: ts=2 sw=2 et filetype=sh
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|||||||
78
rootfs/usr/local/bin/copy
Executable file
78
rootfs/usr/local/bin/copy
Executable file
@@ -0,0 +1,78 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
# shellcheck shell=sh
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
##@Version : 202408102055-git
|
||||||
|
# @@Author : Jason Hempstead
|
||||||
|
# @@Contact : jason@casjaysdev.pro
|
||||||
|
# @@License : LICENSE.md
|
||||||
|
# @@ReadME : copy --help
|
||||||
|
# @@Copyright : Copyright: (c) 2024 Jason Hempstead, Casjays Developments
|
||||||
|
# @@Created : Saturday, Aug 10, 2024 20:55 EDT
|
||||||
|
# @@File : copy
|
||||||
|
# @@Description : copies a file and shows progress
|
||||||
|
# @@Changelog : New script
|
||||||
|
# @@TODO : Better documentation
|
||||||
|
# @@Other :
|
||||||
|
# @@Resource :
|
||||||
|
# @@Terminal App : no
|
||||||
|
# @@sudo/root : no
|
||||||
|
# @@Template : shell/bash
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# shellcheck disable=SC2016
|
||||||
|
# shellcheck disable=SC2031
|
||||||
|
# shellcheck disable=SC2120
|
||||||
|
# shellcheck disable=SC2155
|
||||||
|
# shellcheck disable=SC2199
|
||||||
|
# shellcheck disable=SC2317
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# script variables
|
||||||
|
APPNAME="$(basename "$0" 2>/dev/null)"
|
||||||
|
VERSION="202408102055-git"
|
||||||
|
RUN_USER="$USER"
|
||||||
|
SET_UID="$(id -u)"
|
||||||
|
COPY_CWD="$(realpath "$PWD")"
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# script functions
|
||||||
|
if [ "$SHOW_RAW" != "true" ]; then
|
||||||
|
__printf_color() { printf "%b" "$(tput setaf "${2:-$DEFAULT_COLOR}" 2>/dev/null)" "$1\n" "$(tput sgr0 2>/dev/null)"; }
|
||||||
|
else
|
||||||
|
# Disable colorization
|
||||||
|
__printf_color() { printf '%b\n' "$1" | tr -d '\t' | sed '/^%b$/d;s,\x1B\[ 0-9;]*[a-zA-Z],,g'; }
|
||||||
|
fi
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# check for command
|
||||||
|
__cmd_exists() { which $1 >/dev/null 2>&1 || return 1; }
|
||||||
|
__function_exists() { builtin type $1 >/dev/null 2>&1 || return 1; }
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# custom functions
|
||||||
|
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Define Variables
|
||||||
|
DEFAULT_COLOR="7"
|
||||||
|
COPY_EXIT_STATUS=0
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Main application
|
||||||
|
{ [ $# -eq 2 ] || [ "$1" = "--help" ]; } || { __printf_color "Usage: $APPNAME fromFile toFile" && exit 1; }
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
is_link="$(ls -la "$2" 2>/dev/null | awk '{print $NF}')"
|
||||||
|
if [ "$1" != "$is_link" ]; then
|
||||||
|
if [ -d "$1" ]; then
|
||||||
|
mkdir -p "$2"
|
||||||
|
cp -Rf "$1/." "$2/"
|
||||||
|
COPY_EXIT_STATUS=$?
|
||||||
|
elif [ -e "$1" ]; then
|
||||||
|
cp -Rf "$1" "$2"
|
||||||
|
COPY_EXIT_STATUS=$?
|
||||||
|
else
|
||||||
|
COPY_EXIT_STATUS=2
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# End application
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# lets exit with code
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
exit $COPY_EXIT_STATUS
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# ex: ts=2 sw=2 et filetype=sh
|
||||||
|
|
||||||
@@ -1,49 +1,46 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
##@Version : 202509161148-git
|
##@Version : GEN_SCRIPT_REPLACE_VERSION
|
||||||
# @@Author : Jason Hempstead
|
# @@Author : GEN_SCRIPT_REPLACE_AUTHOR
|
||||||
# @@Contact : jason@casjaysdev.pro
|
# @@Contact : GEN_SCRIPT_REPLACE_EMAIL
|
||||||
# @@License : LICENSE.md
|
# @@License : GEN_SCRIPT_REPLACE_LICENSE
|
||||||
# @@ReadME : entrypoint.sh --help
|
# @@ReadME : entrypoint.sh --help
|
||||||
# @@Copyright : Copyright: (c) 2025 Jason Hempstead, Casjays Developments
|
# @@Copyright : GEN_SCRIPT_REPLACE_COPYRIGHT
|
||||||
# @@Created : Tuesday, Sep 16, 2025 11:48 EDT
|
# @@Created : GEN_SCRIPT_REPLACE_DATE
|
||||||
# @@File : entrypoint.sh
|
# @@File : entrypoint.sh
|
||||||
# @@Description : Entrypoint file for jekyll
|
# @@Description : Entrypoint file for GEN_SCRIPT_REPLACE_APPNAME
|
||||||
# @@Changelog : New script
|
# @@Changelog : GEN_SCRIPT_REPLACE_CHANGELOG
|
||||||
# @@TODO : Better documentation
|
# @@TODO : GEN_SCRIPT_REPLACE_TODO
|
||||||
# @@Other :
|
# @@Other : GEN_SCRIPT_REPLACE_OTHER
|
||||||
# @@Resource :
|
# @@Resource : GEN_SCRIPT_REPLACE_RES
|
||||||
# @@Terminal App : no
|
# @@Terminal App : GEN_SCRIPT_REPLACE_TERMINAL
|
||||||
# @@sudo/root : no
|
# @@sudo/root : GEN_SCRIPT_REPLACE_SUDO
|
||||||
# @@Template : other/docker-entrypoint
|
# @@Template : other/docker-entrypoint
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# shellcheck disable=SC1001,SC1003,SC2001,SC2003,SC2016,SC2031,SC2120,SC2155,SC2199,SC2317,SC2329
|
# shellcheck disable=SC1001,SC1003,SC2001,SC2003,SC2016,SC2031,SC2090,SC2115,SC2120,SC2155,SC2199,SC2229,SC2317,SC2329
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
set -e
|
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
||||||
# run trap command on exit
|
# run trap command on exit
|
||||||
trap 'echo "❌ Fatal error, killing container"; kill -TERM 1' ERR
|
trap 'retVal=$?;[ "$SERVICE_IS_RUNNING" != "yes" ] && [ -f "$SERVICE_PID_FILE" ] && rm -Rf "$SERVICE_PID_FILE";exit $retVal' INT TERM PWR
|
||||||
trap 'retVal=$?;[ "$SERVICE_IS_RUNNING" != "yes" ] && [ -f "$SERVICE_PID_FILE" ] && rm -Rf "$SERVICE_PID_FILE";exit $retVal' SIGINT SIGTERM SIGPWR
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
||||||
# setup debugging - https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
|
# setup debugging - https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
|
||||||
[ -f "/config/.debug" ] && [ -z "$DEBUGGER_OPTIONS" ] && export DEBUGGER_OPTIONS="$(<"/config/.debug")" || DEBUGGER_OPTIONS="${DEBUGGER_OPTIONS:-}"
|
[ -f "/config/.debug" ] && [ -z "$DEBUGGER_OPTIONS" ] && export DEBUGGER_OPTIONS="$(<"/config/.debug")" || DEBUGGER_OPTIONS="${DEBUGGER_OPTIONS:-}"
|
||||||
{ [ "$DEBUGGER" = "on" ] || [ -f "/config/.debug" ]; } && echo "Enabling debugging" && set -o pipefail -x$DEBUGGER_OPTIONS && export DEBUGGER="on" || set -o pipefail
|
{ [ "$DEBUGGER" = "on" ] || [ -f "/config/.debug" ]; } && echo "Enabling debugging" && set -o pipefail -x$DEBUGGER_OPTIONS && export DEBUGGER="on" || set -o pipefail
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
PATH="/usr/local/etc/docker/bin:/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin"
|
PATH="/usr/local/etc/docker/bin:/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Set bash options
|
# Set bash options
|
||||||
SCRIPT_FILE="$0"
|
SCRIPT_FILE="$0"
|
||||||
CONTAINER_NAME="jekyll"
|
CONTAINER_NAME="GEN_SCRIPT_REPLACE_APPNAME"
|
||||||
SCRIPT_NAME="$(basename -- "$SCRIPT_FILE" 2>/dev/null)"
|
SCRIPT_NAME="$(basename -- "$SCRIPT_FILE" 2>/dev/null)"
|
||||||
CONTAINER_NAME="${ENV_CONTAINER_NAME:-$CONTAINER_NAME}"
|
CONTAINER_NAME="${ENV_CONTAINER_NAME:-$CONTAINER_NAME}"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# remove whitespaces from beginning argument
|
# remove whitespaces from beginning argument
|
||||||
while :; do [ "$1" = " " ] && shift 1 || break; done
|
while :; do [ "$1" = " " ] && shift 1 || break; done
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
[ "$1" = "$SCRIPT_FILE" ] && shift 1
|
[ "$1" = "$SCRIPT_FILE" ] && shift 1
|
||||||
[ "$1" = "$SCRIPT_NAME" ] && shift 1
|
[ "$1" = "$SCRIPT_NAME" ] && shift 1
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# import the functions file
|
# import the functions file
|
||||||
if [ -f "/usr/local/etc/docker/functions/entrypoint.sh" ]; then
|
if [ -f "/usr/local/etc/docker/functions/entrypoint.sh" ]; then
|
||||||
. "/usr/local/etc/docker/functions/entrypoint.sh"
|
. "/usr/local/etc/docker/functions/entrypoint.sh"
|
||||||
@@ -51,7 +48,7 @@ else
|
|||||||
echo "Can not load functions from /usr/local/etc/docker/functions/entrypoint.sh"
|
echo "Can not load functions from /usr/local/etc/docker/functions/entrypoint.sh"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
case "$1" in
|
case "$1" in
|
||||||
# Help message
|
# Help message
|
||||||
-h | --help)
|
-h | --help)
|
||||||
@@ -65,60 +62,60 @@ case "$1" in
|
|||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Create the default env files
|
# Create the default env files
|
||||||
__create_env_file "/config/env/default.sh" "/root/env.sh" &>/dev/null
|
__create_env_file "/config/env/default.sh" "/root/env.sh" &>/dev/null
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# import variables from files
|
# import variables from files
|
||||||
for set_env in "/root/env.sh" "/usr/local/etc/docker/env"/*.sh "/config/env"/*.sh; do
|
for set_env in "/root/env.sh" "/usr/local/etc/docker/env"/*.sh "/config/env"/*.sh; do
|
||||||
[ -f "$set_env" ] && . "$set_env"
|
[ -f "$set_env" ] && . "$set_env"
|
||||||
done
|
done
|
||||||
unset set_env
|
unset set_env
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# User to use to launch service - IE: postgres
|
# User to use to launch service - IE: postgres
|
||||||
RUNAS_USER="root" # normally root
|
RUNAS_USER="root" # normally root
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Set user and group from env
|
# Set user and group from env
|
||||||
SERVICE_USER="${PUID:-$SERVICE_USER}"
|
SERVICE_USER="${PUID:-$SERVICE_USER}"
|
||||||
SERVICE_GROUP="${PGID:-$SERVICE_GROUP}"
|
SERVICE_GROUP="${PGID:-$SERVICE_GROUP}"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Set user and group ID
|
# Set user and group ID
|
||||||
SERVICE_UID="${SERVICE_UID:-0}" # set the user id
|
SERVICE_UID="${SERVICE_UID:-0}" # set the user id
|
||||||
SERVICE_GID="${SERVICE_GID:-0}" # set the group id
|
SERVICE_GID="${SERVICE_GID:-0}" # set the group id
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# User and group in which the service switches to - IE: nginx,apache,mysql,postgres
|
# User and group in which the service switches to - IE: nginx,apache,mysql,postgres
|
||||||
SERVICE_USER="${SERVICE_USER:-$jekyll}" # execute command as another user
|
SERVICE_USER="${SERVICE_USER:-GEN_SCRIPT_REPLACE_APPNAME}" # execute command as another user
|
||||||
SERVICE_GROUP="${SERVICE_GROUP:-jekyll}" # Set the service group
|
SERVICE_GROUP="${SERVICE_GROUP:-GEN_SCRIPT_REPLACE_APPNAME}" # Set the service group
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Secondary ports
|
# Secondary ports
|
||||||
SERVER_PORTS="" # specifiy other ports
|
SERVER_PORTS="" # specifiy other ports
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Primary server port- will be added to server ports
|
# Primary server port- will be added to server ports
|
||||||
WEB_SERVER_PORT="" # port : 80,443
|
WEB_SERVER_PORT="" # port : 80,443
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Healthcheck variables
|
# Healthcheck variables
|
||||||
HEALTH_ENABLED="yes" # enable healthcheck [yes/no]
|
HEALTH_ENABLED="yes" # enable healthcheck [yes/no]
|
||||||
SERVICES_LIST="tini" # comma seperated list of processes for the healthcheck
|
SERVICES_LIST="tini" # comma separated list of processes for the healthcheck
|
||||||
HEALTH_ENDPOINTS="" # url endpoints: [http://localhost/health,http://localhost/test]
|
HEALTH_ENDPOINTS="" # url endpoints: [http://localhost/health,http://localhost/test]
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Update path var
|
# Update path var
|
||||||
export PATH RUNAS_USER SERVICE_USER SERVICE_GROUP SERVICE_UID SERVICE_GID WWW_ROOT_DIR DATABASE_DIR
|
export PATH RUNAS_USER SERVICE_USER SERVICE_GROUP SERVICE_UID SERVICE_GID WWW_ROOT_DIR DATABASE_DIR
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Custom variables
|
# Custom variables
|
||||||
|
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# show message
|
# show message
|
||||||
__run_message() {
|
__run_message() {
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
################## END OF CONFIGURATION #####################
|
################## END OF CONFIGURATION #####################
|
||||||
# Lets get containers ip address
|
# Lets get containers ip address
|
||||||
IP4_ADDRESS="$(__get_ip4)"
|
IP4_ADDRESS="$(__get_ip4)"
|
||||||
IP6_ADDRESS="$(__get_ip6)"
|
IP6_ADDRESS="$(__get_ip6)"
|
||||||
CONTAINER_IP4_ADDRESS="${CONTAINER_IP4_ADDRESS:-$IP4_ADDRESS}"
|
CONTAINER_IP4_ADDRESS="${CONTAINER_IP4_ADDRESS:-$IP4_ADDRESS}"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Startup variables
|
# Startup variables
|
||||||
export INIT_DATE="${INIT_DATE:-$(date)}"
|
export INIT_DATE="${INIT_DATE:-$(date)}"
|
||||||
export CONTAINER_INIT="${CONTAINER_INIT:-no}"
|
export CONTAINER_INIT="${CONTAINER_INIT:-no}"
|
||||||
@@ -128,14 +125,14 @@ export ENTRYPOINT_FIRST_RUN="${ENTRYPOINT_FIRST_RUN:-yes}"
|
|||||||
export DATA_DIR_INITIALIZED="${DATA_DIR_INITIALIZED:-no}"
|
export DATA_DIR_INITIALIZED="${DATA_DIR_INITIALIZED:-no}"
|
||||||
export CONFIG_DIR_INITIALIZED="${CONFIG_DIR_INITIALIZED:-no}"
|
export CONFIG_DIR_INITIALIZED="${CONFIG_DIR_INITIALIZED:-no}"
|
||||||
export CONTAINER_NAME="${ENV_CONTAINER_NAME:-$CONTAINER_NAME}"
|
export CONTAINER_NAME="${ENV_CONTAINER_NAME:-$CONTAINER_NAME}"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# System
|
# System
|
||||||
export LANG="${LANG:-C.UTF-8}"
|
export LANG="${LANG:-C.UTF-8}"
|
||||||
export LC_ALL="${LANG:-C.UTF-8}"
|
export LC_ALL="${LANG:-C.UTF-8}"
|
||||||
export TZ="${TZ:-${TIMEZONE:-America/New_York}}"
|
export TZ="${TZ:-${TIMEZONE:-America/New_York}}"
|
||||||
export HOSTNAME="$(hostname -s)"
|
export HOSTNAME="$(hostname -s)"
|
||||||
export DOMAINNAME="$(hostname -d)"
|
export DOMAINNAME="$(hostname -d)"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Default directories
|
# Default directories
|
||||||
export SSL_DIR="${SSL_DIR:-/config/ssl}"
|
export SSL_DIR="${SSL_DIR:-/config/ssl}"
|
||||||
export SSL_CA="${SSL_CERT:-/config/ssl/ca.crt}"
|
export SSL_CA="${SSL_CERT:-/config/ssl/ca.crt}"
|
||||||
@@ -145,12 +142,12 @@ export LOCAL_BIN_DIR="${LOCAL_BIN_DIR:-/usr/local/bin}"
|
|||||||
export DEFAULT_DATA_DIR="${DEFAULT_DATA_DIR:-/usr/local/share/template-files/data}"
|
export DEFAULT_DATA_DIR="${DEFAULT_DATA_DIR:-/usr/local/share/template-files/data}"
|
||||||
export DEFAULT_CONF_DIR="${DEFAULT_CONF_DIR:-/usr/local/share/template-files/config}"
|
export DEFAULT_CONF_DIR="${DEFAULT_CONF_DIR:-/usr/local/share/template-files/config}"
|
||||||
export DEFAULT_TEMPLATE_DIR="${DEFAULT_TEMPLATE_DIR:-/usr/local/share/template-files/defaults}"
|
export DEFAULT_TEMPLATE_DIR="${DEFAULT_TEMPLATE_DIR:-/usr/local/share/template-files/defaults}"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Backup settings
|
# Backup settings
|
||||||
export BACKUP_MAX_DAYS="${BACKUP_MAX_DAYS:-}"
|
export BACKUP_MAX_DAYS="${BACKUP_MAX_DAYS:-}"
|
||||||
export BACKUP_RUN_CRON="${BACKUP_RUN_CRON:-}"
|
export BACKUP_RUN_CRON="${BACKUP_RUN_CRON:-}"
|
||||||
export BACKUP_DIR="${BACKUP_DIR:-/data/backups}"
|
export BACKUP_DIR="${BACKUP_DIR:-/data/backups}"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Additional
|
# Additional
|
||||||
export PHP_INI_DIR="${PHP_INI_DIR:-$(__find_php_ini)}"
|
export PHP_INI_DIR="${PHP_INI_DIR:-$(__find_php_ini)}"
|
||||||
export PHP_BIN_DIR="${PHP_BIN_DIR:-$(__find_php_bin)}"
|
export PHP_BIN_DIR="${PHP_BIN_DIR:-$(__find_php_bin)}"
|
||||||
@@ -163,7 +160,7 @@ export ENTRYPOINT_PID_FILE="${ENTRYPOINT_PID_FILE:-$ENTRYPOINT_PID_FILE}"
|
|||||||
export ENTRYPOINT_INIT_FILE="${ENTRYPOINT_INIT_FILE:-/config/.entrypoint.done}"
|
export ENTRYPOINT_INIT_FILE="${ENTRYPOINT_INIT_FILE:-/config/.entrypoint.done}"
|
||||||
export ENTRYPOINT_DATA_INIT_FILE="${ENTRYPOINT_DATA_INIT_FILE:-/data/.docker_has_run}"
|
export ENTRYPOINT_DATA_INIT_FILE="${ENTRYPOINT_DATA_INIT_FILE:-/data/.docker_has_run}"
|
||||||
export ENTRYPOINT_CONFIG_INIT_FILE="${ENTRYPOINT_CONFIG_INIT_FILE:-/config/.docker_has_run}"
|
export ENTRYPOINT_CONFIG_INIT_FILE="${ENTRYPOINT_CONFIG_INIT_FILE:-/config/.docker_has_run}"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
if [ -n "$CONTAINER_WEB_SERVER_WWW_REPO" ]; then
|
if [ -n "$CONTAINER_WEB_SERVER_WWW_REPO" ]; then
|
||||||
www_temp_dir="/tmp/git/$(basename -- "$CONTAINER_WEB_SERVER_WWW_REPO")"
|
www_temp_dir="/tmp/git/$(basename -- "$CONTAINER_WEB_SERVER_WWW_REPO")"
|
||||||
rm -Rf "${WWW_ROOT_DIR:?}"/* "${www_temp_dir:?}"/*
|
rm -Rf "${WWW_ROOT_DIR:?}"/* "${www_temp_dir:?}"/*
|
||||||
@@ -173,42 +170,42 @@ if [ -n "$CONTAINER_WEB_SERVER_WWW_REPO" ]; then
|
|||||||
rsync -ra "$www_temp_dir/" "$WWW_ROOT_DIR" --delete >/dev/null 2>&1
|
rsync -ra "$www_temp_dir/" "$WWW_ROOT_DIR" --delete >/dev/null 2>&1
|
||||||
rm -Rf "$www_temp_dir"
|
rm -Rf "$www_temp_dir"
|
||||||
fi
|
fi
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# variables based on env/files
|
# variables based on env/files
|
||||||
[ -f "/config/enable/ssl" ] && SSL_ENABLED="yes"
|
[ -f "/config/enable/ssl" ] && SSL_ENABLED="yes"
|
||||||
[ -f "/config/enable/ssh" ] && SSH_ENABLED="yes"
|
[ -f "/config/enable/ssh" ] && SSH_ENABLED="yes"
|
||||||
[ "$WEB_SERVER_PORT" = "443" ] && SSL_ENABLED="yes"
|
[ "$WEB_SERVER_PORT" = "443" ] && SSL_ENABLED="yes"
|
||||||
[ "$CONTAINER_WEB_SERVER_PROTOCOL" = "https" ] && SSL_ENABLED="yes"
|
[ "$CONTAINER_WEB_SERVER_PROTOCOL" = "https" ] && SSL_ENABLED="yes"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# export variables
|
# export variables
|
||||||
|
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# is already Initialized
|
# is already Initialized
|
||||||
[ -f "$ENTRYPOINT_DATA_INIT_FILE" ] && DATA_DIR_INITIALIZED="yes" || DATA_DIR_INITIALIZED="no"
|
[ -f "$ENTRYPOINT_DATA_INIT_FILE" ] && DATA_DIR_INITIALIZED="yes" || DATA_DIR_INITIALIZED="no"
|
||||||
[ -f "$ENTRYPOINT_CONFIG_INIT_FILE" ] && CONFIG_DIR_INITIALIZED="yes" || CONFIG_DIR_INITIALIZED="no"
|
[ -f "$ENTRYPOINT_CONFIG_INIT_FILE" ] && CONFIG_DIR_INITIALIZED="yes" || CONFIG_DIR_INITIALIZED="no"
|
||||||
{ [ -f "$ENTRYPOINT_PID_FILE" ] || [ -f "$ENTRYPOINT_INIT_FILE" ]; } && ENTRYPOINT_FIRST_RUN="no" || ENTRYPOINT_FIRST_RUN="yes"
|
{ [ -f "$ENTRYPOINT_PID_FILE" ] || [ -f "$ENTRYPOINT_INIT_FILE" ]; } && ENTRYPOINT_FIRST_RUN="no" || ENTRYPOINT_FIRST_RUN="yes"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# clean ENV_PORTS variables
|
# clean ENV_PORTS variables
|
||||||
ENV_PORTS="${ENV_PORTS//,/ }" #
|
ENV_PORTS="${ENV_PORTS//,/ }" #
|
||||||
ENV_PORTS="${ENV_PORTS//\/*/}" #
|
ENV_PORTS="${ENV_PORTS//\/*/}" #
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# clean SERVER_PORTS variables
|
# clean SERVER_PORTS variables
|
||||||
SERVER_PORTS="${SERVER_PORTS//,/ }" #
|
SERVER_PORTS="${SERVER_PORTS//,/ }" #
|
||||||
SERVER_PORTS="${SERVER_PORTS//\/*/}" #
|
SERVER_PORTS="${SERVER_PORTS//\/*/}" #
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# clean WEB_SERVER_PORTS variables
|
# clean WEB_SERVER_PORTS variables
|
||||||
WEB_SERVER_PORTS="${WEB_SERVER_PORT//\/*/}" #
|
WEB_SERVER_PORTS="${WEB_SERVER_PORT//\/*/}" #
|
||||||
WEB_SERVER_PORTS="${WEB_SERVER_PORTS//\/*/}" #
|
WEB_SERVER_PORTS="${WEB_SERVER_PORTS//\/*/}" #
|
||||||
WEB_SERVER_PORTS="${WEB_SERVER_PORT//,/ } ${ENV_WEB_SERVER_PORTS//,/ }" #
|
WEB_SERVER_PORTS="${WEB_SERVER_PORT//,/ } ${ENV_WEB_SERVER_PORTS//,/ }" #
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# rewrite and merge variables
|
# rewrite and merge variables
|
||||||
ENV_PORTS="$(__format_variables "$ENV_PORTS" || false)"
|
ENV_PORTS="$(__format_variables "$ENV_PORTS" || false)"
|
||||||
WEB_SERVER_PORTS="$(__format_variables "$WEB_SERVER_PORTS" || false)"
|
WEB_SERVER_PORTS="$(__format_variables "$WEB_SERVER_PORTS" || false)"
|
||||||
ENV_PORTS="$(__format_variables "$SERVER_PORTS" "$WEB_SERVER_PORTS" "$ENV_PORTS" "$SERVER_PORTS" || false)"
|
ENV_PORTS="$(__format_variables "$SERVER_PORTS" "$WEB_SERVER_PORTS" "$ENV_PORTS" "$SERVER_PORTS" || false)"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Remove the commas from env
|
# Remove the commas from env
|
||||||
HEALTH_ENDPOINTS="${HEALTH_ENDPOINTS//,/ }"
|
HEALTH_ENDPOINTS="${HEALTH_ENDPOINTS//,/ }"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# create required directories
|
# create required directories
|
||||||
mkdir -p "/run"
|
mkdir -p "/run"
|
||||||
mkdir -p "/tmp"
|
mkdir -p "/tmp"
|
||||||
@@ -221,11 +218,11 @@ mkdir -p "/run/init.d"
|
|||||||
mkdir -p "/config/enable"
|
mkdir -p "/config/enable"
|
||||||
mkdir -p "/config/secure"
|
mkdir -p "/config/secure"
|
||||||
mkdir -p "/usr/local/etc/docker/exec"
|
mkdir -p "/usr/local/etc/docker/exec"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# create required files
|
# create required files
|
||||||
touch "/data/logs/start.log"
|
touch "/data/logs/start.log"
|
||||||
touch "/data/logs/entrypoint.log"
|
touch "/data/logs/entrypoint.log"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# fix permissions
|
# fix permissions
|
||||||
chmod -f 777 "/run"
|
chmod -f 777 "/run"
|
||||||
chmod -f 777 "/tmp"
|
chmod -f 777 "/tmp"
|
||||||
@@ -239,48 +236,40 @@ chmod -f 777 "/config/enable"
|
|||||||
chmod -f 777 "/config/secure"
|
chmod -f 777 "/config/secure"
|
||||||
chmod -f 777 "/data/logs/entrypoint.log"
|
chmod -f 777 "/data/logs/entrypoint.log"
|
||||||
chmod -f 777 "/usr/local/etc/docker/exec"
|
chmod -f 777 "/usr/local/etc/docker/exec"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# lets ensure everyone can write to std*
|
# lets ensure everyone can write to std*
|
||||||
[ -f "/dev/stdin" ] && chmod -f 777 "/dev/stdin"
|
[ -f "/dev/stdin" ] && chmod -f 777 "/dev/stdin"
|
||||||
[ -f "/dev/stderr" ] && chmod -f 777 "/dev/stderr"
|
[ -f "/dev/stderr" ] && chmod -f 777 "/dev/stderr"
|
||||||
[ -f "/dev/stdout" ] && chmod -f 777 "/dev/stdout"
|
[ -f "/dev/stdout" ] && chmod -f 777 "/dev/stdout"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
cat <<EOF | tee /etc/profile.d/locales.shadow /etc/profile.d/locales.sh >/dev/null
|
cat <<EOF | tee /etc/profile.d/locales.shadow /etc/profile.d/locales.sh >/dev/null
|
||||||
export LANG="\${LANG:-C.UTF-8}"
|
export LANG="\${LANG:-C.UTF-8}"
|
||||||
export LC_ALL="\${LANG:-C.UTF-8}"
|
export LC_ALL="\${LANG:-C.UTF-8}"
|
||||||
export TZ="\${TZ:-\${TIMEZONE:-America/New_York}}"
|
export TZ="\${TZ:-\${TIMEZONE:-America/New_York}}"
|
||||||
EOF
|
EOF
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Create the backup dir
|
# Create the backup dir
|
||||||
[ -n "$BACKUP_DIR" ] && { [ -d "$BACKUP_DIR" ] || mkdir -p "$BACKUP_DIR"; }
|
[ -n "$BACKUP_DIR" ] && { [ -d "$BACKUP_DIR" ] || mkdir -p "$BACKUP_DIR"; }
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
if [ -f "$ENTRYPOINT_PID_FILE" ]; then
|
|
||||||
START_SERVICES="no"
|
|
||||||
touch "$ENTRYPOINT_PID_FILE"
|
|
||||||
else
|
|
||||||
echo "$$" >"$ENTRYPOINT_PID_FILE"
|
|
||||||
# Clean any stale PID files on first run
|
|
||||||
rm -f /run/init.d/*.pid 2>/dev/null || true
|
|
||||||
fi
|
|
||||||
if [ -f "$ENTRYPOINT_INIT_FILE" ]; then
|
if [ -f "$ENTRYPOINT_INIT_FILE" ]; then
|
||||||
ENTRYPOINT_MESSAGE="no" ENTRYPOINT_FIRST_RUN="no"
|
ENTRYPOINT_MESSAGE="no" ENTRYPOINT_FIRST_RUN="no"
|
||||||
fi
|
fi
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
if [ "$ENTRYPOINT_FIRST_RUN" != "no" ]; then
|
if [ "$ENTRYPOINT_FIRST_RUN" != "no" ]; then
|
||||||
# Show start message
|
# Show start message
|
||||||
if [ "$CONFIG_DIR_INITIALIZED" = "no" ] || [ "$DATA_DIR_INITIALIZED" = "no" ]; then
|
if [ "$CONFIG_DIR_INITIALIZED" = "no" ] || [ "$DATA_DIR_INITIALIZED" = "no" ]; then
|
||||||
[ "$ENTRYPOINT_MESSAGE" = "yes" ] && echo "Executing entrypoint script for jekyll"
|
[ "$ENTRYPOINT_MESSAGE" = "yes" ] && echo "Executing entrypoint script for GEN_SCRIPT_REPLACE_APPNAME"
|
||||||
fi
|
fi
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Set reusable variables
|
# Set reusable variables
|
||||||
{ { [ -w "/etc" ] && [ ! -f "/etc/hosts" ]; } || [ -w "/etc/hosts" ]; } && UPDATE_FILE_HOSTS="yes" && touch "/etc/hosts"
|
{ { [ -w "/etc" ] && [ ! -f "/etc/hosts" ]; } || [ -w "/etc/hosts" ]; } && UPDATE_FILE_HOSTS="yes" && touch "/etc/hosts"
|
||||||
{ { [ -w "/etc" ] && [ ! -f "/etc/timezone" ]; } || [ -w "/etc/timezone" ]; } && UPDATE_FILE_TZ="yes" && touch "/etc/timezone"
|
{ { [ -w "/etc" ] && [ ! -f "/etc/timezone" ]; } || [ -w "/etc/timezone" ]; } && UPDATE_FILE_TZ="yes" && touch "/etc/timezone"
|
||||||
{ { [ -w "/etc" ] && [ ! -f "/etc/resolv.conf" ]; } || [ -w "/etc/resolv.conf" ]; } && UPDATE_FILE_RESOLV="yes" && touch "/etc/resolv.conf"
|
{ { [ -w "/etc" ] && [ ! -f "/etc/resolv.conf" ]; } || [ -w "/etc/resolv.conf" ]; } && UPDATE_FILE_RESOLV="yes" && touch "/etc/resolv.conf"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Set timezone
|
# Set timezone
|
||||||
[ -n "$TZ" ] && [ "$UPDATE_FILE_TZ" = "yes" ] && echo "$TZ" >"/etc/timezone"
|
[ -n "$TZ" ] && [ "$UPDATE_FILE_TZ" = "yes" ] && echo "$TZ" >"/etc/timezone"
|
||||||
[ -f "/usr/share/zoneinfo/$TZ" ] && [ "$UPDATE_FILE_TZ" = "yes" ] && ln -sf "/usr/share/zoneinfo/$TZ" "/etc/localtime"
|
[ -f "/usr/share/zoneinfo/$TZ" ] && [ "$UPDATE_FILE_TZ" = "yes" ] && ln -sf "/usr/share/zoneinfo/$TZ" "/etc/localtime"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# if ipv6 add it to /etc/hosts
|
# if ipv6 add it to /etc/hosts
|
||||||
if [ "$UPDATE_FILE_HOSTS" = "yes" ]; then
|
if [ "$UPDATE_FILE_HOSTS" = "yes" ]; then
|
||||||
echo "# known hostname mappings" >"/etc/hosts"
|
echo "# known hostname mappings" >"/etc/hosts"
|
||||||
@@ -291,98 +280,99 @@ if [ "$ENTRYPOINT_FIRST_RUN" != "no" ]; then
|
|||||||
__printf_space "40" "127.0.0.1" "localhost" >>"/etc/hosts"
|
__printf_space "40" "127.0.0.1" "localhost" >>"/etc/hosts"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# add .internal domain
|
# add .internal domain
|
||||||
if [ "$UPDATE_FILE_HOSTS" = "yes" ] && [ -n "$HOSTNAME" ]; then
|
if [ "$UPDATE_FILE_HOSTS" = "yes" ] && [ -n "$HOSTNAME" ]; then
|
||||||
__grep_test " $HOSTNAME" "/etc/hosts" || __printf_space "40" "${CONTAINER_IP4_ADDRESS:-127.0.0.1}" "$HOSTNAME" >>"/etc/hosts"
|
__grep_test " $HOSTNAME" "/etc/hosts" || __printf_space "40" "${CONTAINER_IP4_ADDRESS:-127.0.0.1}" "$HOSTNAME" >>"/etc/hosts"
|
||||||
__grep_test " ${HOSTNAME%%.*}.internal" "/etc/hosts" || __printf_space "40" "${CONTAINER_IP4_ADDRESS:-127.0.0.1}" "${HOSTNAME%%.*}.internal" >>"/etc/hosts"
|
__grep_test " ${HOSTNAME%%.*}.internal" "/etc/hosts" || __printf_space "40" "${CONTAINER_IP4_ADDRESS:-127.0.0.1}" "${HOSTNAME%%.*}.internal" >>"/etc/hosts"
|
||||||
fi
|
fi
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# add domainname
|
# add domainname
|
||||||
if [ "$UPDATE_FILE_HOSTS" = "yes" ] && [ "$DOMAINNAME" != "internal" ] && [ -n "$DOMAINNAME" ] && [ "$HOSTNAME.$DOMAINNAME" != "$DOMAINNAME" ]; then
|
if [ "$UPDATE_FILE_HOSTS" = "yes" ] && [ "$DOMAINNAME" != "internal" ] && [ -n "$DOMAINNAME" ] && [ "$HOSTNAME.$DOMAINNAME" != "$DOMAINNAME" ]; then
|
||||||
__grep_test " ${HOSTNAME%%.*}.$DOMAINNAME" "/etc/hosts" || __printf_space "40" "${CONTAINER_IP4_ADDRESS:-127.0.0.1}" "${HOSTNAME%%.*}.$DOMAINNAME" >>"/etc/hosts"
|
__grep_test " ${HOSTNAME%%.*}.$DOMAINNAME" "/etc/hosts" || __printf_space "40" "${CONTAINER_IP4_ADDRESS:-127.0.0.1}" "${HOSTNAME%%.*}.$DOMAINNAME" >>"/etc/hosts"
|
||||||
fi
|
fi
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Set containers hostname
|
# Set containers hostname
|
||||||
[ -n "$HOSTNAME" ] && [ "$UPDATE_FILE_HOSTS" = "yes" ] && echo "$HOSTNAME" >"/etc/hostname"
|
[ -n "$HOSTNAME" ] && [ "$UPDATE_FILE_HOSTS" = "yes" ] && echo "$HOSTNAME" >"/etc/hostname"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
if [ -f "/etc/hostname" ]; then
|
if [ -f "/etc/hostname" ]; then
|
||||||
[ -n "$(type -P hostname)" ] && hostname -F "/etc/hostname" &>/dev/null || HOSTNAME="$(<"/etc/hostname")"
|
[ -n "$(type -P hostname)" ] && hostname -F "/etc/hostname" &>/dev/null || HOSTNAME="$(<"/etc/hostname")"
|
||||||
export HOSTNAME
|
export HOSTNAME
|
||||||
fi
|
fi
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# import hosts file into container
|
# import hosts file into container
|
||||||
[ -f "/usr/local/etc/hosts" ] && [ "$UPDATE_FILE_HOSTS" = "yes" ] && cat "/usr/local/etc/hosts" | grep -vF "$HOSTNAME" >>"/etc/hosts"
|
[ -f "/usr/local/etc/hosts" ] && [ "$UPDATE_FILE_HOSTS" = "yes" ] && cat "/usr/local/etc/hosts" | grep -vF "$HOSTNAME" >>"/etc/hosts"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# import resolv.conf file into container
|
# import resolv.conf file into container
|
||||||
[ "$CUSTOM_DNS" != "yes" ] && [ -f "/usr/local/etc/resolv.conf" ] && [ "$UPDATE_FILE_RESOLV" = "yes" ] && cat "/usr/local/etc/resolv.conf" >"/etc/resolv.conf"
|
[ "$CUSTOM_DNS" != "yes" ] && [ -f "/usr/local/etc/resolv.conf" ] && [ "$UPDATE_FILE_RESOLV" = "yes" ] && cat "/usr/local/etc/resolv.conf" >"/etc/resolv.conf"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
if [ -n "$HOME" ] && [ -d "/usr/local/etc/skel" ]; then
|
if [ -n "$HOME" ] && [ -d "/usr/local/etc/skel" ]; then
|
||||||
[ -d "$HOME" ] && cp -Rf "/usr/local/etc/skel/." "$HOME/"
|
[ -d "$HOME" ] && cp -Rf "/usr/local/etc/skel/." "$HOME/"
|
||||||
fi
|
fi
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
fi
|
fi
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Delete any .gitkeep files
|
# Delete any .gitkeep files
|
||||||
[ -d "/data" ] && rm -Rf "/data/.gitkeep" "/data"/*/*.gitkeep
|
[ -d "/data" ] && rm -Rf "/data/.gitkeep" "/data"/*/*.gitkeep
|
||||||
[ -d "/config" ] && rm -Rf "/config/.gitkeep" "/config"/*/*.gitkeep
|
[ -d "/config" ] && rm -Rf "/config/.gitkeep" "/config"/*/*.gitkeep
|
||||||
[ -f "/usr/local/bin/.gitkeep" ] && rm -Rf "/usr/local/bin/.gitkeep"
|
[ -f "/usr/local/bin/.gitkeep" ] && rm -Rf "/usr/local/bin/.gitkeep"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Setup bin directory - /config/bin > /usr/local/bin
|
# Setup bin directory - /config/bin > /usr/local/bin
|
||||||
__initialize_custom_bin_dir
|
__initialize_custom_bin_dir
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Copy default system configs - /usr/local/share/template-files/defaults > /config/
|
# Copy default system configs - /usr/local/share/template-files/defaults > /config/
|
||||||
__initialize_default_templates
|
__initialize_default_templates
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Copy custom config files - /usr/local/share/template-files/config > /config/
|
# Copy custom config files - /usr/local/share/template-files/config > /config/
|
||||||
__initialize_config_dir
|
__initialize_config_dir
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Copy custom data files - /usr/local/share/template-files/data > /data/
|
# Copy custom data files - /usr/local/share/template-files/data > /data/
|
||||||
__initialize_data_dir
|
__initialize_data_dir
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
__initialize_ssl_certs
|
__initialize_ssl_certs
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
if [ -f "$ENTRYPOINT_INIT_FILE" ]; then
|
if [ -f "$ENTRYPOINT_INIT_FILE" ]; then
|
||||||
ENTRYPOINT_FIRST_RUN="no"
|
ENTRYPOINT_FIRST_RUN="no"
|
||||||
fi
|
fi
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
if [ -d "/config" ]; then
|
if [ -d "/config" ]; then
|
||||||
echo "Initialized on: $INIT_DATE" >"$ENTRYPOINT_INIT_FILE"
|
echo "Initialized on: $INIT_DATE" >"$ENTRYPOINT_INIT_FILE"
|
||||||
fi
|
fi
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Check if this is a new container
|
# Check if this is a new container
|
||||||
if [ -f "$ENTRYPOINT_DATA_INIT_FILE" ]; then
|
if [ -f "$ENTRYPOINT_DATA_INIT_FILE" ]; then
|
||||||
DATA_DIR_INITIALIZED="yes"
|
DATA_DIR_INITIALIZED="yes"
|
||||||
fi
|
fi
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
if [ -d "/data" ]; then
|
if [ -d "/data" ]; then
|
||||||
echo "Initialized on: $INIT_DATE" >"$ENTRYPOINT_DATA_INIT_FILE"
|
echo "Initialized on: $INIT_DATE" >"$ENTRYPOINT_DATA_INIT_FILE"
|
||||||
fi
|
fi
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
if [ -f "$ENTRYPOINT_CONFIG_INIT_FILE" ]; then
|
if [ -f "$ENTRYPOINT_CONFIG_INIT_FILE" ]; then
|
||||||
CONFIG_DIR_INITIALIZED="yes"
|
CONFIG_DIR_INITIALIZED="yes"
|
||||||
fi
|
fi
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
if [ -d "/config" ]; then
|
if [ -d "/config" ]; then
|
||||||
echo "Initialized on: $INIT_DATE" >"$ENTRYPOINT_CONFIG_INIT_FILE"
|
echo "Initialized on: $INIT_DATE" >"$ENTRYPOINT_CONFIG_INIT_FILE"
|
||||||
fi
|
fi
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
if [ "$ENTRYPOINT_FIRST_RUN" != "no" ]; then
|
if [ "$ENTRYPOINT_FIRST_RUN" != "no" ]; then
|
||||||
# setup the smtp server
|
# setup the smtp server
|
||||||
__setup_mta
|
__setup_mta
|
||||||
fi
|
fi
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# if no pid assume container restart - clean stale files on restart
|
# if no pid assume container restart - clean stale files on restart
|
||||||
if [ ! -f "$ENTRYPOINT_PID_FILE" ]; then
|
if [ -f "$ENTRYPOINT_PID_FILE" ]; then
|
||||||
START_SERVICES="yes"
|
START_SERVICES="no"
|
||||||
# Clean stale pid files from previous container runs
|
touch "$ENTRYPOINT_PID_FILE"
|
||||||
|
else
|
||||||
|
START_SERVICES=yes
|
||||||
|
# Clean any stale PID files on first run
|
||||||
rm -f /run/__start_init_scripts.pid /run/init.d/*.pid /run/*.pid 2>/dev/null || true
|
rm -f /run/__start_init_scripts.pid /run/init.d/*.pid /run/*.pid 2>/dev/null || true
|
||||||
elif [ ! -f "/run/__start_init_scripts.pid" ]; then
|
|
||||||
START_SERVICES="yes"
|
|
||||||
fi
|
fi
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
[ "$ENTRYPOINT_MESSAGE" = "yes" ] && __printf_space "40" "Container ip address is:" "$CONTAINER_IP4_ADDRESS"
|
[ "$ENTRYPOINT_MESSAGE" = "yes" ] && __printf_space "40" "The containers ip address is:" "$CONTAINER_IP4_ADDRESS"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Show configured listing processes
|
# Show configured listing processes
|
||||||
if [ "$ENTRYPOINT_MESSAGE" = "yes" ] && [ -n "$ENV_PORTS" ]; then
|
if [ "$ENTRYPOINT_MESSAGE" = "yes" ] && [ -n "$ENV_PORTS" ]; then
|
||||||
show_port=""
|
show_port=""
|
||||||
@@ -390,34 +380,42 @@ if [ "$ENTRYPOINT_MESSAGE" = "yes" ] && [ -n "$ENV_PORTS" ]; then
|
|||||||
__printf_space "40" "The following ports are open:" "$show_port"
|
__printf_space "40" "The following ports are open:" "$show_port"
|
||||||
unset port show_port
|
unset port show_port
|
||||||
fi
|
fi
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# execute init script
|
# execute init script
|
||||||
if [ -f "/tmp/init" ]; then sh "/tmp/init"; fi
|
if [ -f "/tmp/init" ]; then sh "/tmp/init"; fi
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# create user if needed
|
# create user if needed
|
||||||
__create_service_user "$SERVICE_USER" "$SERVICE_GROUP" "${WORK_DIR:-/home/$SERVICE_USER}" "${SERVICE_UID:-}" "${SERVICE_GID:-}"
|
__create_service_user "$SERVICE_USER" "$SERVICE_GROUP" "${WORK_DIR:-/home/$SERVICE_USER}" "${SERVICE_UID:-}" "${SERVICE_GID:-}"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Modify user if needed
|
# Modify user if needed
|
||||||
__set_user_group_id $SERVICE_USER ${SERVICE_UID:-} ${SERVICE_GID:-}
|
__set_user_group_id $SERVICE_USER ${SERVICE_UID:-} ${SERVICE_GID:-}
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Show message
|
# Show message
|
||||||
__run_message
|
__run_message
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Just start services
|
# Just start services
|
||||||
START_SERVICES="${START_SERVICES:-SYSTEM_INIT}"
|
START_SERVICES="${START_SERVICES:-SYSTEM_INIT}"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Start all services if no pidfile
|
# Determine if we should start services based on command
|
||||||
if [ "$START_SERVICES" = "yes" ] && [ "$1" != "backup" ] && [ "$1" != "healthcheck" ] && [ "$1" != "cron" ] && [ "$1" != "tail" ] && [ "$1" != "logs" ] && [ "$1" != "cron" ]; then
|
# Only skip service start for the 'init' command
|
||||||
[ "$1" = "start" ] && shift 1
|
SKIP_SERVICE_START="no"
|
||||||
[ "$1" = "all" ] && shift 1
|
[ "$1" = "init" ] && SKIP_SERVICE_START="yes" && CONTAINER_INIT="yes"
|
||||||
[ "$1" = "init" ] && export CONTAINER_INIT="yes"
|
[ "$2" = "init" ] && SKIP_SERVICE_START="yes" && CONTAINER_INIT="yes"
|
||||||
echo "$$" >"$ENTRYPOINT_PID_FILE"
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
rm -Rf "/run"/*/*pid
|
# Start all services if no pidfile and not skipping
|
||||||
__start_init_scripts "/usr/local/etc/docker/init.d"
|
if [ "$START_SERVICES" = "yes" ] || [ -z "$1" ]; then
|
||||||
|
if [ "$SKIP_SERVICE_START" = "no" ]; then
|
||||||
|
[ "$1" = "start" ] && shift 1
|
||||||
|
[ "$1" = "all" ] && shift 1
|
||||||
|
rm -Rf "/run"/*/*pid 2>/dev/null || true
|
||||||
|
echo "$$" >"$ENTRYPOINT_PID_FILE"
|
||||||
|
__start_init_scripts "/usr/local/etc/docker/init.d"
|
||||||
|
CONTAINER_INIT="${CONTAINER_INIT:-no}"
|
||||||
|
fi
|
||||||
START_SERVICES="no"
|
START_SERVICES="no"
|
||||||
CONTAINER_INIT="${CONTAINER_INIT:-no}"
|
|
||||||
fi
|
fi
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
export START_SERVICES CONTAINER_INIT ENTRYPOINT_PID_FILE
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Begin options
|
# Begin options
|
||||||
case "$1" in
|
case "$1" in
|
||||||
init)
|
init)
|
||||||
@@ -477,50 +475,57 @@ backup)
|
|||||||
;;
|
;;
|
||||||
# Docker healthcheck
|
# Docker healthcheck
|
||||||
healthcheck)
|
healthcheck)
|
||||||
arguments="$*"
|
shift 1
|
||||||
healthStatus=0
|
case "$1" in
|
||||||
healthEnabled="${HEALTH_ENABLED:-}"
|
init | test)
|
||||||
healthPorts="${WEB_SERVER_PORTS:-}"
|
exit 0
|
||||||
healthEndPoints="${HEALTH_ENDPOINTS:-}"
|
;;
|
||||||
SERVICES_LIST="${arguments:-$SERVICES_LIST}"
|
*)
|
||||||
services="$(echo "${SERVICES_LIST//,/ }")"
|
arguments="$*"
|
||||||
healthMessage="Everything seems to be running"
|
healthStatus=0
|
||||||
[ "$healthEnabled" = "yes" ] || exit 0
|
healthEnabled="${HEALTH_ENABLED:-}"
|
||||||
if [ -d "/run/healthcheck" ] && [ "$(ls -A "/run/healthcheck" | wc -l)" -ne 0 ]; then
|
healthPorts="${WEB_SERVER_PORTS:-}"
|
||||||
for service in /run/healthcheck/*; do
|
healthEndPoints="${HEALTH_ENDPOINTS:-}"
|
||||||
name=$(basename -- $service)
|
SERVICES_LIST="${arguments:-$SERVICES_LIST}"
|
||||||
services+="$name "
|
services="$(echo "${SERVICES_LIST//,/ }")"
|
||||||
|
healthMessage="Everything seems to be running"
|
||||||
|
[ "$healthEnabled" = "yes" ] || exit 0
|
||||||
|
if [ -d "/run/healthcheck" ] && [ "$(ls -A "/run/healthcheck" | wc -l)" -ne 0 ]; then
|
||||||
|
for service in /run/healthcheck/*; do
|
||||||
|
name=$(basename -- $service)
|
||||||
|
services+="$name "
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
services="$(echo "$services" | tr ' ' '\n' | sort -u | grep -v '^$')"
|
||||||
|
for proc in $services; do
|
||||||
|
if [ -n "$proc" ]; then
|
||||||
|
if ! __pgrep "$proc"; then
|
||||||
|
echo "$proc is not running" >&2
|
||||||
|
healthStatus=$((healthStatus + 1))
|
||||||
|
fi
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
fi
|
for port in $ports; do
|
||||||
services="$(echo "$services" | tr ' ' '\n' | sort -u | grep -v '^$')"
|
if [ -n "$(type -P netstat)" ] && [ -n "$port" ]; then
|
||||||
{ [ "$1" = "init" ] || [ "$1" = "test" ]; } && exit 0
|
if ! netstat -taupln | grep -q ":$port "; then
|
||||||
for proc in $services; do
|
echo "$port isn't open" >&2
|
||||||
if [ -n "$proc" ]; then
|
healthStatus=$((healthStatus + 1))
|
||||||
if ! __pgrep "$proc"; then
|
fi
|
||||||
echo "$proc is not running" >&2
|
|
||||||
healthStatus=$((healthStatus + 1))
|
|
||||||
fi
|
fi
|
||||||
fi
|
done
|
||||||
done
|
for endpoint in $healthEndPoints; do
|
||||||
for port in $ports; do
|
if [ -n "$endpoint" ]; then
|
||||||
if [ -n "$(type -P netstat)" ] && [ -n "$port" ]; then
|
if ! __curl "$endpoint"; then
|
||||||
if ! netstat -taupln | grep -q ":$port "; then
|
echo "Can not connect to $endpoint" >&2
|
||||||
echo "$port isn't open" >&2
|
healthStatus=$((healthStatus + 1))
|
||||||
healthStatus=$((healthStatus + 1))
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
done
|
||||||
done
|
[ "$healthStatus" -eq 0 ] || healthMessage="Errors reported see: docker logs --follow $CONTAINER_NAME"
|
||||||
for endpoint in $healthEndPoints; do
|
[ -n "$healthMessage" ] && echo "$healthMessage"
|
||||||
if [ -n "$endpoint" ]; then
|
exit $healthStatus
|
||||||
if ! __curl "$endpoint"; then
|
;;
|
||||||
echo "Can not connect to $endpoint" >&2
|
esac
|
||||||
healthStatus=$((healthStatus + 1))
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
[ "$healthStatus" -eq 0 ] || healthMessage="Errors reported see: docker logs --follow $CONTAINER_NAME"
|
|
||||||
[ -n "$healthMessage" ] && echo "$healthMessage"
|
|
||||||
exit $healthStatus
|
|
||||||
;;
|
;;
|
||||||
# show open ports
|
# show open ports
|
||||||
ports)
|
ports)
|
||||||
@@ -603,8 +608,8 @@ start)
|
|||||||
exit $?
|
exit $?
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# end of entrypoint
|
# end of entrypoint
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
# ex: ts=2 sw=2 et filetype=sh
|
# ex: ts=2 sw=2 et filetype=sh
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
# shellcheck shell=sh
|
# shellcheck shell=sh
|
||||||
# shellcheck disable=SC2016
|
# shellcheck disable=SC2016
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
USER_UID="$(id -u)"
|
USER_UID="$(id -u)"
|
||||||
USER_GID="$(id -g)"
|
USER_GID="$(id -g)"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
if [ -x "$(command -v apt 2>/dev/null)" ]; then
|
if [ -x "$(command -v apt 2>/dev/null)" ]; then
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
pkmgr_cmd="apt"
|
pkmgr_cmd="apt"
|
||||||
@@ -58,7 +58,7 @@ else
|
|||||||
pkmgr_update_cmd="$pkmgr_cmd"
|
pkmgr_update_cmd="$pkmgr_cmd"
|
||||||
pkmgr_install_cmd="$pkmgr_cmd"
|
pkmgr_install_cmd="$pkmgr_cmd"
|
||||||
fi
|
fi
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
if [ -f "/config/pkmgr/settings.conf" ]; then
|
if [ -f "/config/pkmgr/settings.conf" ]; then
|
||||||
. "/config/pkmgr/settings.conf"
|
. "/config/pkmgr/settings.conf"
|
||||||
elif [ -f "/etc/pkmgr/settings.conf" ]; then
|
elif [ -f "/etc/pkmgr/settings.conf" ]; then
|
||||||
@@ -73,9 +73,9 @@ pkmgr_install_cmd="$pkmgr_install_cmd"
|
|||||||
pkmgr_mkcache_cmd="$pkmgr_mkcache_cmd"
|
pkmgr_mkcache_cmd="$pkmgr_mkcache_cmd"
|
||||||
EEOF
|
EEOF
|
||||||
fi
|
fi
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
[ -n "$pkmgr_cmd" ] || { echo "Can not determine the package manager" && exit 1; }
|
[ -n "$pkmgr_cmd" ] || { echo "Can not determine the package manager" && exit 1; }
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
case "$1" in
|
case "$1" in
|
||||||
pip)
|
pip)
|
||||||
shift 1
|
shift 1
|
||||||
@@ -138,5 +138,5 @@ clean)
|
|||||||
exit $?
|
exit $?
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# end
|
# end
|
||||||
|
|||||||
74
rootfs/usr/local/bin/symlink
Executable file
74
rootfs/usr/local/bin/symlink
Executable file
@@ -0,0 +1,74 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
# shellcheck shell=sh
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
##@Version : 202408102055-git
|
||||||
|
# @@Author : Jason Hempstead
|
||||||
|
# @@Contact : jason@casjaysdev.pro
|
||||||
|
# @@License : LICENSE.md
|
||||||
|
# @@ReadME : symlink --help
|
||||||
|
# @@Copyright : Copyright: (c) 2024 Jason Hempstead, Casjays Developments
|
||||||
|
# @@Created : Saturday, Aug 10, 2024 20:55 EDT
|
||||||
|
# @@File : symlink
|
||||||
|
# @@Description : symlink a file and shows progress
|
||||||
|
# @@Changelog : New script
|
||||||
|
# @@TODO : Better documentation
|
||||||
|
# @@Other :
|
||||||
|
# @@Resource :
|
||||||
|
# @@Terminal App : no
|
||||||
|
# @@sudo/root : no
|
||||||
|
# @@Template : shell/bash
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# shellcheck disable=SC2016
|
||||||
|
# shellcheck disable=SC2031
|
||||||
|
# shellcheck disable=SC2120
|
||||||
|
# shellcheck disable=SC2155
|
||||||
|
# shellcheck disable=SC2199
|
||||||
|
# shellcheck disable=SC2317
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# script variables
|
||||||
|
APPNAME="$(basename "$0" 2>/dev/null)"
|
||||||
|
VERSION="202408102055-git"
|
||||||
|
RUN_USER="$USER"
|
||||||
|
SET_UID="$(id -u)"
|
||||||
|
COPY_CWD="$(realpath "$PWD")"
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# script functions
|
||||||
|
if [ "$SHOW_RAW" != "true" ]; then
|
||||||
|
__printf_color() { printf "%b" "$(tput setaf "${2:-$DEFAULT_COLOR}" 2>/dev/null)" "$1\n" "$(tput sgr0 2>/dev/null)"; }
|
||||||
|
else
|
||||||
|
# Disable colorization
|
||||||
|
__printf_color() { printf '%b\n' "$1" | tr -d '\t' | sed '/^%b$/d;s,\x1B\[ 0-9;]*[a-zA-Z],,g'; }
|
||||||
|
fi
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# check for command
|
||||||
|
__cmd_exists() { which $1 >/dev/null 2>&1 || return 1; }
|
||||||
|
__function_exists() { builtin type $1 >/dev/null 2>&1 || return 1; }
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# custom functions
|
||||||
|
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Define Variables
|
||||||
|
DEFAULT_COLOR="7"
|
||||||
|
SYMLINK_EXIT_STATUS=0
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Main application
|
||||||
|
{ [ $# -eq 2 ] || [ "$1" = "--help" ]; } || { __printf_color "Usage: $APPNAME fromFile toFile" && exit 1; }
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
is_link="$(ls -la "$2" 2>/dev/null | awk '{print $NF}')"
|
||||||
|
if [ "$1" != "$is_link" ]; then
|
||||||
|
if [ -e "$1" ]; then
|
||||||
|
ln -sf "$1" "$2"
|
||||||
|
SYMLINK_EXIT_STATUS=$?
|
||||||
|
else
|
||||||
|
SYMLINK_EXIT_STATUS=2
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# End application
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# lets exit with code
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
exit $SYMLINK_EXIT_STATUS
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# ex: ts=2 sw=2 et filetype=sh
|
||||||
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,17 +1,17 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Set bash options
|
# Set bash options
|
||||||
[ "$DEBUGGER" = "on" ] && echo "Enabling debugging" && set -o pipefail -x$DEBUGGER_OPTIONS || set -o pipefail
|
[ "$DEBUGGER" = "on" ] && echo "Enabling debugging" && set -o pipefail -x$DEBUGGER_OPTIONS || set -o pipefail
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# import the functions file
|
# import the functions file
|
||||||
[ -f "/usr/local/etc/docker/functions/entrypoint.sh" ] && . "/usr/local/etc/docker/functions/entrypoint.sh"
|
[ -f "/usr/local/etc/docker/functions/entrypoint.sh" ] && . "/usr/local/etc/docker/functions/entrypoint.sh"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# GLOBAL enviroment variables
|
# GLOBAL enviroment variables
|
||||||
#USER="${USER:-root}"
|
#USER="${USER:-root}"
|
||||||
#LANG="${LANG:-C.UTF-8}"
|
#LANG="${LANG:-C.UTF-8}"
|
||||||
#TZ="${TZ:-America/New_York}"
|
#TZ="${TZ:-America/New_York}"
|
||||||
#SERVICE_USER="${SERVICE_USER:-root}"
|
#SERVICE_USER="${SERVICE_USER:-root}"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# directory settings
|
# directory settings
|
||||||
#BACKUP_DIR="${BACKUP_DIR:-/data/backups}"
|
#BACKUP_DIR="${BACKUP_DIR:-/data/backups}"
|
||||||
#WWW_ROOT_DIR="${WWW_ROOT_DIR:-/usr/local/share/httpd/default}"
|
#WWW_ROOT_DIR="${WWW_ROOT_DIR:-/usr/local/share/httpd/default}"
|
||||||
@@ -21,39 +21,39 @@
|
|||||||
#DEFAULT_CONF_DIR="${DEFAULT_CONF_DIR:-/usr/local/share/template-files/config}"
|
#DEFAULT_CONF_DIR="${DEFAULT_CONF_DIR:-/usr/local/share/template-files/config}"
|
||||||
#DEFAULT_TEMPLATE_DIR="${DEFAULT_TEMPLATE_DIR:-/usr/local/share/template-files/defaults}"
|
#DEFAULT_TEMPLATE_DIR="${DEFAULT_TEMPLATE_DIR:-/usr/local/share/template-files/defaults}"
|
||||||
#DBTYPE="sqlite"
|
#DBTYPE="sqlite"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# healthcheck
|
# healthcheck
|
||||||
#HEALTH_ENABLED="${HEALTH_ENABLED:-$ENV_HEALTH_ENABLED}"
|
#HEALTH_ENABLED="${HEALTH_ENABLED:-$ENV_HEALTH_ENABLED}"
|
||||||
#HEALTH_URL="${HEALTH_URL:-}"
|
#HEALTH_URL="${HEALTH_URL:-}"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# php settings
|
# php settings
|
||||||
#PHP_VERSION="${PHP_VERSION//php/}"
|
#PHP_VERSION="${PHP_VERSION//php/}"
|
||||||
#PHP_INI_DIR="${PHP_INI_DIR:-$(__find_php_ini)}"
|
#PHP_INI_DIR="${PHP_INI_DIR:-$(__find_php_ini)}"
|
||||||
#PHP_BIN_DIR="${PHP_BIN_DIR:-$(__find_php_bin)}"
|
#PHP_BIN_DIR="${PHP_BIN_DIR:-$(__find_php_bin)}"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# services/ports
|
# services/ports
|
||||||
#ENV_PORTS="${ENV_PORTS:-}"
|
#ENV_PORTS="${ENV_PORTS:-}"
|
||||||
#SERVICE_PORT="${SERVICE_PORT:-$PORT}"
|
#SERVICE_PORT="${SERVICE_PORT:-$PORT}"
|
||||||
#WEB_SERVER_PORTS="${WEB_SERVER_PORTS:-$ENV_WEB_SERVER_PORTS}"
|
#WEB_SERVER_PORTS="${WEB_SERVER_PORTS:-$ENV_WEB_SERVER_PORTS}"
|
||||||
#SERVICES_LIST="${PROCS_LIST:-$SERVICES_LIST} "
|
#SERVICES_LIST="${PROCS_LIST:-$SERVICES_LIST} "
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# networing info
|
# networing info
|
||||||
DOMAINNAME="${DOMAINNAME:-}"
|
DOMAINNAME="${DOMAINNAME:-}"
|
||||||
HOSTNAME="${HOSTNAME:-casjaysdev-GEN_SCRIPT_REPLACE_APPNAME}"
|
HOSTNAME="${HOSTNAME:-casjaysdev-GEN_SCRIPT_REPLACE_APPNAME}"
|
||||||
FULL_DOMAIN_NAME="${FULL_DOMAIN_NAME:-${DOMAINNAME:-$HOSTNAME}}"
|
FULL_DOMAIN_NAME="${FULL_DOMAIN_NAME:-${DOMAINNAME:-$HOSTNAME}}"
|
||||||
SERVER_ADMIN="${SERVER_ADMIN:-root@${EMAIL_DOMAIN:-${DOMAINNAME:-$FULL_DOMAIN_NAME}}}"
|
SERVER_ADMIN="${SERVER_ADMIN:-root@${EMAIL_DOMAIN:-${DOMAINNAME:-$FULL_DOMAIN_NAME}}}"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
EMAIL_RELAY="${EMAIL_RELAY:-}"
|
EMAIL_RELAY="${EMAIL_RELAY:-}"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# get ip addresses
|
# get ip addresses
|
||||||
CONTAINER_IP4_ADDRESS="${CONTAINER_IP4_ADDRESS:-$(__get_ip4)}"
|
CONTAINER_IP4_ADDRESS="${CONTAINER_IP4_ADDRESS:-$(__get_ip4)}"
|
||||||
CONTAINER_IP6_ADDRESS="${CONTAINER_IP6_ADDRESS:-$(__get_ip6)}"
|
CONTAINER_IP6_ADDRESS="${CONTAINER_IP6_ADDRESS:-$(__get_ip6)}"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# cerbot
|
# cerbot
|
||||||
#CERT_BOT_MAIL="${CERT_BOT_MAIL:-}"
|
#CERT_BOT_MAIL="${CERT_BOT_MAIL:-}"
|
||||||
#CERTBOT_DOMAINS="${CERTBOT_DOMAINS:-}"
|
#CERTBOT_DOMAINS="${CERTBOT_DOMAINS:-}"
|
||||||
#CERT_BOT_ENABLED="${CERT_BOT_ENABLED:-false}"
|
#CERT_BOT_ENABLED="${CERT_BOT_ENABLED:-false}"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# ssl server settings
|
# ssl server settings
|
||||||
#SSL_ENABLED="${SSL_ENABLED:-false}"
|
#SSL_ENABLED="${SSL_ENABLED:-false}"
|
||||||
#SSL_DIR="${SSL_DIR:-/config/ssl}"
|
#SSL_DIR="${SSL_DIR:-/config/ssl}"
|
||||||
@@ -69,22 +69,22 @@ CONTAINER_IP6_ADDRESS="${CONTAINER_IP6_ADDRESS:-$(__get_ip6)}"
|
|||||||
#DAYS_VALID="${DAYS_VALID:-3650}"
|
#DAYS_VALID="${DAYS_VALID:-3650}"
|
||||||
#RSA="${RSA:-4096}"
|
#RSA="${RSA:-4096}"
|
||||||
#CN="${CN:-$FULL_DOMAIN_NAME}"
|
#CN="${CN:-$FULL_DOMAIN_NAME}"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# web server configs
|
# web server configs
|
||||||
HTTPD_CONFIG_FILE="${HTTPD_CONFIG_FILE:-$(__find_httpd_conf)}"
|
HTTPD_CONFIG_FILE="${HTTPD_CONFIG_FILE:-$(__find_httpd_conf)}"
|
||||||
NGINX_CONFIG_FILE="${NGINX_CONFIG_FILE:-$(__find_nginx_conf)}"
|
NGINX_CONFIG_FILE="${NGINX_CONFIG_FILE:-$(__find_nginx_conf)}"
|
||||||
LIGHTTPD_CONFIG_FILE="${LIGHTTPD_CONFIG_FILE:-$(__find_lighttpd_conf)}"
|
LIGHTTPD_CONFIG_FILE="${LIGHTTPD_CONFIG_FILE:-$(__find_lighttpd_conf)}"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# redis env
|
# redis env
|
||||||
DATABASE_DIR_REDIS="${DATABASE_DIR_REDIS:-$DATABASE_BASE_DIR/redis}"
|
DATABASE_DIR_REDIS="${DATABASE_DIR_REDIS:-$DATABASE_BASE_DIR/redis}"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# postgresql env
|
# postgresql env
|
||||||
DATABASE_DIR_PGSQL="${DATABASE_DIR_PGSQL:-$PGDATA}"
|
DATABASE_DIR_PGSQL="${DATABASE_DIR_PGSQL:-$PGDATA}"
|
||||||
PGDATA="${DATABASE_DIR_PGSQL:-$DATABASE_BASE_DIR/postgres}"
|
PGDATA="${DATABASE_DIR_PGSQL:-$DATABASE_BASE_DIR/postgres}"
|
||||||
POSTGRES_USER="${DATABASE_USER_ROOT:-$POSTGRES_USER}"
|
POSTGRES_USER="${DATABASE_USER_ROOT:-$POSTGRES_USER}"
|
||||||
POSTGRES_PASSWORD="${DATABASE_PASS_ROOT:-$POSTGRES_PASSWORD}"
|
POSTGRES_PASSWORD="${DATABASE_PASS_ROOT:-$POSTGRES_PASSWORD}"
|
||||||
POSTGRES_CONFIG_FILE="${POSTGRES_CONFIG_FILE:-$(__find_pgsql_conf)}"
|
POSTGRES_CONFIG_FILE="${POSTGRES_CONFIG_FILE:-$(__find_pgsql_conf)}"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# mariadb env
|
# mariadb env
|
||||||
MARIADB_ROOT_HOST="${MARIADB_ROOT_HOST:-%}"
|
MARIADB_ROOT_HOST="${MARIADB_ROOT_HOST:-%}"
|
||||||
MARIADB_AUTO_UPGRADE="${MARIADB_AUTO_UPGRADE:-yes}"
|
MARIADB_AUTO_UPGRADE="${MARIADB_AUTO_UPGRADE:-yes}"
|
||||||
@@ -97,30 +97,30 @@ MARIADB_ALLOW_EMPTY_ROOT_PASSWORD="${MARIADB_ALLOW_EMPTY_ROOT_PASSWORD:-}"
|
|||||||
MARIADB_INITDB_SKIP_TZINFO="${MARIADB_INITDB_SKIP_TZINFO}:-"
|
MARIADB_INITDB_SKIP_TZINFO="${MARIADB_INITDB_SKIP_TZINFO}:-"
|
||||||
MARIADB_RANDOM_ROOT_PASSWORD="${MARIADB_RANDOM_ROOT_PASSWORD:-}"
|
MARIADB_RANDOM_ROOT_PASSWORD="${MARIADB_RANDOM_ROOT_PASSWORD:-}"
|
||||||
MARIADB_CONFIG_FILE="${MARIADB_CONFIG_FILE:-$(__find_mysql_conf)}"
|
MARIADB_CONFIG_FILE="${MARIADB_CONFIG_FILE:-$(__find_mysql_conf)}"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# mongodb env
|
# mongodb env
|
||||||
INITDB_ROOT_USERNAME="${DATABASE_USER_ROOT:-$INITDB_ROOT_USERNAME}"
|
INITDB_ROOT_USERNAME="${DATABASE_USER_ROOT:-$INITDB_ROOT_USERNAME}"
|
||||||
DATABASE_DIR_MONGODB="${DATABASE_DIR_MONGODB:-$DATABASE_BASE_DIR/mongodb}"
|
DATABASE_DIR_MONGODB="${DATABASE_DIR_MONGODB:-$DATABASE_BASE_DIR/mongodb}"
|
||||||
MONGO_INITDB_ROOT_PASSWORD="${DATABASE_PASS_ROOT:-$MONGO_INITDB_ROOT_PASSWORD}"
|
MONGO_INITDB_ROOT_PASSWORD="${DATABASE_PASS_ROOT:-$MONGO_INITDB_ROOT_PASSWORD}"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# couchdb env
|
# couchdb env
|
||||||
NODENAME="${NODENAME:-}"
|
NODENAME="${NODENAME:-}"
|
||||||
COUCHDB_USER="${DATABASE_USER_ROOT:-$COUCHDB_USER}"
|
COUCHDB_USER="${DATABASE_USER_ROOT:-$COUCHDB_USER}"
|
||||||
COUCHDB_PASSWORD="${DATABASE_PASS_ROOT:-$COUCHDB_PASSWORD}"
|
COUCHDB_PASSWORD="${DATABASE_PASS_ROOT:-$COUCHDB_PASSWORD}"
|
||||||
DATABASE_DIR_COUCHDB="${DATABASE_DIR_COUCHDB:-$DATABASE_BASE_DIR/couchdb}"
|
DATABASE_DIR_COUCHDB="${DATABASE_DIR_COUCHDB:-$DATABASE_BASE_DIR/couchdb}"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Supabase
|
# Supabase
|
||||||
DATABASE_DIR_SUPABASE="${DATABASE_DIR_SUPABASE:-$DATABASE_BASE_DIR/supabase}"
|
DATABASE_DIR_SUPABASE="${DATABASE_DIR_SUPABASE:-$DATABASE_BASE_DIR/supabase}"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# docker env
|
# docker env
|
||||||
DOCKER_HOST="unix:///run/docker.sock"
|
DOCKER_HOST="unix://var/run/docker.sock"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# File locations
|
# File locations
|
||||||
ENTRYPOINT_PID_FILE="${ENTRYPOINT_PID_FILE:-/run/init.d/entrypoint.pid}"
|
ENTRYPOINT_PID_FILE="${ENTRYPOINT_PID_FILE:-/run/init.d/entrypoint.pid}"
|
||||||
ENTRYPOINT_INIT_FILE="${ENTRYPOINT_INIT_FILE:-/config/.entrypoint.done}"
|
ENTRYPOINT_INIT_FILE="${ENTRYPOINT_INIT_FILE:-/config/.entrypoint.done}"
|
||||||
ENTRYPOINT_DATA_INIT_FILE="${ENTRYPOINT_DATA_INIT_FILE:-/data/.docker_has_run}"
|
ENTRYPOINT_DATA_INIT_FILE="${ENTRYPOINT_DATA_INIT_FILE:-/data/.docker_has_run}"
|
||||||
ENTRYPOINT_CONFIG_INIT_FILE="${ENTRYPOINT_CONFIG_INIT_FILE:-/config/.docker_has_run}"
|
ENTRYPOINT_CONFIG_INIT_FILE="${ENTRYPOINT_CONFIG_INIT_FILE:-/config/.docker_has_run}"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Startup variables
|
# Startup variables
|
||||||
INIT_DATE="${INIT_DATE:-$(date)}"
|
INIT_DATE="${INIT_DATE:-$(date)}"
|
||||||
START_SERVICES="${START_SERVICES:-yes}"
|
START_SERVICES="${START_SERVICES:-yes}"
|
||||||
@@ -128,8 +128,8 @@ ENTRYPOINT_MESSAGE="${ENTRYPOINT_MESSAGE:-yes}"
|
|||||||
ENTRYPOINT_FIRST_RUN="${ENTRYPOINT_FIRST_RUN:-yes}"
|
ENTRYPOINT_FIRST_RUN="${ENTRYPOINT_FIRST_RUN:-yes}"
|
||||||
DATA_DIR_INITIALIZED="${DATA_DIR_INITIALIZED:-false}"
|
DATA_DIR_INITIALIZED="${DATA_DIR_INITIALIZED:-false}"
|
||||||
CONFIG_DIR_INITIALIZED="${CONFIG_DIR_INITIALIZED:-false}"
|
CONFIG_DIR_INITIALIZED="${CONFIG_DIR_INITIALIZED:-false}"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
if [ -f "$ENTRYPOINT_PID_FILE" ] || [ -f "$ENTRYPOINT_INIT_FILE" ]; then
|
if [ -f "$ENTRYPOINT_PID_FILE" ] || [ -f "$ENTRYPOINT_INIT_FILE" ]; then
|
||||||
START_SERVICES="no" ENTRYPOINT_MESSAGE="no" ENTRYPOINT_FIRST_RUN="no"
|
START_SERVICES="no" ENTRYPOINT_MESSAGE="no" ENTRYPOINT_FIRST_RUN="no"
|
||||||
fi
|
fi
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# directory settings
|
# directory settings
|
||||||
WWW_ROOT_DIR="${ENV_WWW_ROOT_DIR:-${WWW_ROOT_DIR}}"
|
WWW_ROOT_DIR="${ENV_WWW_ROOT_DIR:-${WWW_ROOT_DIR}}"
|
||||||
BACKUP_DIR="${ENV_BACKUP_DIR:-${BACKUP_DIR:-/data/backups}}"
|
BACKUP_DIR="${ENV_BACKUP_DIR:-${BACKUP_DIR:-/data/backups}}"
|
||||||
@@ -7,4 +7,4 @@ DATABASE_BASE_DIR="${ENV_DATABASE_BASE_DIR:-${DATABASE_BASE_DIR:-/data/db}}"
|
|||||||
DEFAULT_DATA_DIR="${ENV_DEFAULT_DATA_DIR:-${DEFAULT_DATA_DIR:-/usr/local/share/template-files/data}}"
|
DEFAULT_DATA_DIR="${ENV_DEFAULT_DATA_DIR:-${DEFAULT_DATA_DIR:-/usr/local/share/template-files/data}}"
|
||||||
DEFAULT_CONF_DIR="${ENV_DEFAULT_CONF_DIR:-${DEFAULT_CONF_DIR:-/usr/local/share/template-files/config}}"
|
DEFAULT_CONF_DIR="${ENV_DEFAULT_CONF_DIR:-${DEFAULT_CONF_DIR:-/usr/local/share/template-files/config}}"
|
||||||
DEFAULT_TEMPLATE_DIR="${ENV_DEFAULT_TEMPLATE_DIR:-${EDEFAULT_TEMPLATE_DIR:-/usr/local/share/template-files/defaults}}"
|
DEFAULT_TEMPLATE_DIR="${ENV_DEFAULT_TEMPLATE_DIR:-${EDEFAULT_TEMPLATE_DIR:-/usr/local/share/template-files/defaults}}"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# get ip addresses
|
# get ip addresses
|
||||||
CONTAINER_IP4_ADDRESS="${CONTAINER_IP4_ADDRESS:-$(__get_ip4)}"
|
CONTAINER_IP4_ADDRESS="${CONTAINER_IP4_ADDRESS:-$(__get_ip4)}"
|
||||||
CONTAINER_IP6_ADDRESS="${CONTAINER_IP6_ADDRESS:-$(__get_ip6)}"
|
CONTAINER_IP6_ADDRESS="${CONTAINER_IP6_ADDRESS:-$(__get_ip6)}"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# cerbot
|
# cerbot
|
||||||
CERT_BOT_MAIL="${ENV_CERT_BOT_MAIL:-$CERT_BOT_MAIL}"
|
CERT_BOT_MAIL="${ENV_CERT_BOT_MAIL:-$CERT_BOT_MAIL}"
|
||||||
CERTBOT_DOMAINS="${ENV_CERTBOT_DOMAINS:-$CERTBOT_DOMAINS}"
|
CERTBOT_DOMAINS="${ENV_CERTBOT_DOMAINS:-$CERTBOT_DOMAINS}"
|
||||||
CERT_BOT_ENABLED="${ENV_CERT_BOT_ENABLED:-${CERT_BOT_ENABLED:-false}}"
|
CERT_BOT_ENABLED="${ENV_CERT_BOT_ENABLED:-${CERT_BOT_ENABLED:-false}}"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# couchdb env
|
# couchdb env
|
||||||
COUCHDB_NODENAME="${ENV_COUCHDB_NODENAME:-${COUCHDB_NODENAME:-$NODENAME}}"
|
COUCHDB_NODENAME="${ENV_COUCHDB_NODENAME:-${COUCHDB_NODENAME:-$NODENAME}}"
|
||||||
COUCHDB_USER="${ENV_COUCHDB_USER:-${COUCHDB_USER:-$DATABASE_USER_ROOT}}"
|
COUCHDB_USER="${ENV_COUCHDB_USER:-${COUCHDB_USER:-$DATABASE_USER_ROOT}}"
|
||||||
COUCHDB_PASSWORD="${ENV_COUCHDB_PASSWORD:-${COUCHDB_PASSWORD:-$DATABASE_PASS_ROOT}}"
|
COUCHDB_PASSWORD="${ENV_COUCHDB_PASSWORD:-${COUCHDB_PASSWORD:-$DATABASE_PASS_ROOT}}"
|
||||||
DATABASE_DIR_COUCHDB="${ENV_DATABASE_DIR_COUCHDB:-${DATABASE_DIR_COUCHDB:-/data/db/couchdb}}"
|
DATABASE_DIR_COUCHDB="${ENV_DATABASE_DIR_COUCHDB:-${DATABASE_DIR_COUCHDB:-/data/db/couchdb}}"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# docker env
|
# docker env
|
||||||
DOCKER_HOST="${DOCKER_HOST:-unix://var/run/docker.sock}"
|
DOCKER_HOST="${DOCKER_HOST:-unix://var/run/docker.sock}"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# GLOBAL enviroment variables
|
# GLOBAL enviroment variables
|
||||||
USER="${USER:-root}"
|
USER="${USER:-root}"
|
||||||
LANG="${LANG:-C.UTF-8}"
|
LANG="${LANG:-C.UTF-8}"
|
||||||
TZ="${TZ:-America/New_York}"
|
TZ="${TZ:-America/New_York}"
|
||||||
ENV_PORTS="${ENV_PORTS//\/*/}"
|
ENV_PORTS="${ENV_PORTS//\/*/}"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# How to set permissions
|
# How to set permissions
|
||||||
SERVICE_USER="${SERVICE_USER:-}"
|
SERVICE_USER="${SERVICE_USER:-}"
|
||||||
SERVICE_GROUP="${SERVICE_GROUP:-}"
|
SERVICE_GROUP="${SERVICE_GROUP:-}"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
SERVICE_UID="${SERVICE_UID:-}" # set the user id
|
SERVICE_UID="${SERVICE_UID:-}" # set the user id
|
||||||
SERVICE_GID="${SERVICE_GID:-}" # set the group id
|
SERVICE_GID="${SERVICE_GID:-}" # set the group id
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# healthcheck
|
# healthcheck
|
||||||
HEALTH_ENABLED="${HEALTH_ENABLED:-}"
|
HEALTH_ENABLED="${HEALTH_ENABLED:-}"
|
||||||
HEALTH_URL="${HEALTH_URL:-}"
|
HEALTH_URL="${HEALTH_URL:-}"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# mariadb env
|
# mariadb env
|
||||||
MARIADB_ROOT_HOST="${MARIADB_ROOT_HOST:-%}"
|
MARIADB_ROOT_HOST="${MARIADB_ROOT_HOST:-%}"
|
||||||
MARIADB_AUTO_UPGRADE="${MARIADB_AUTO_UPGRADE:-yes}"
|
MARIADB_AUTO_UPGRADE="${MARIADB_AUTO_UPGRADE:-yes}"
|
||||||
@@ -11,4 +11,4 @@ MARIADB_ALLOW_EMPTY_ROOT_PASSWORD="${MARIADB_ALLOW_EMPTY_ROOT_PASSWORD:-}"
|
|||||||
MARIADB_INITDB_SKIP_TZINFO="${MARIADB_INITDB_SKIP_TZINFO}:-"
|
MARIADB_INITDB_SKIP_TZINFO="${MARIADB_INITDB_SKIP_TZINFO}:-"
|
||||||
MARIADB_RANDOM_ROOT_PASSWORD="${MARIADB_RANDOM_ROOT_PASSWORD:-}"
|
MARIADB_RANDOM_ROOT_PASSWORD="${MARIADB_RANDOM_ROOT_PASSWORD:-}"
|
||||||
MARIADB_CONFIG_FILE="${MARIADB_CONFIG_FILE:-$(__find_mysql_conf)}"
|
MARIADB_CONFIG_FILE="${MARIADB_CONFIG_FILE:-$(__find_mysql_conf)}"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# mongodb env
|
# mongodb env
|
||||||
DATABASE_DIR_MONGODB="${DATABASE_DIR_MONGODB:-/data/db/mongodb}"
|
DATABASE_DIR_MONGODB="${DATABASE_DIR_MONGODB:-/data/db/mongodb}"
|
||||||
INITDB_ROOT_USERNAME="${DATABASE_USER_ROOT:-$INITDB_ROOT_USERNAME}"
|
INITDB_ROOT_USERNAME="${DATABASE_USER_ROOT:-$INITDB_ROOT_USERNAME}"
|
||||||
@@ -17,4 +17,4 @@ ME_CONFIG_MONGODB_AUTH_PASSWORD_FILE="${ME_CONFIG_MONGODB_AUTH_PASSWORD_FILE:-}"
|
|||||||
ME_CONFIG_MONGODB_CA_FILE="${ME_CONFIG_MONGODB_CA_FILE:-}"
|
ME_CONFIG_MONGODB_CA_FILE="${ME_CONFIG_MONGODB_CA_FILE:-}"
|
||||||
VCAP_APP_HOST="${VCAP_APP_HOST:-0.0.0.0}"
|
VCAP_APP_HOST="${VCAP_APP_HOST:-0.0.0.0}"
|
||||||
VCAP_APP_PORT="${VCAP_APP_PORT:-19054}"
|
VCAP_APP_PORT="${VCAP_APP_PORT:-19054}"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# networing info
|
# networing info
|
||||||
DOMAINNAME="${DOMAINNAME:-}"
|
DOMAINNAME="${DOMAINNAME:-}"
|
||||||
EMAIL_RELAY="${EMAIL_RELAY:-}"
|
EMAIL_RELAY="${EMAIL_RELAY:-}"
|
||||||
@@ -6,4 +6,4 @@ HOSTNAME="${HOSTNAME:-casjaysdev-GEN_SCRIPT_REPLACE_APPNAME}"
|
|||||||
EMAIL_DOMAIN="${EMAIL_DOMAIN:-${DOMAINNAME:-$HOSTNAME}}"
|
EMAIL_DOMAIN="${EMAIL_DOMAIN:-${DOMAINNAME:-$HOSTNAME}}"
|
||||||
FULL_DOMAIN_NAME="${FULL_DOMAIN_NAME:-${DOMAINNAME:-$HOSTNAME}}"
|
FULL_DOMAIN_NAME="${FULL_DOMAIN_NAME:-${DOMAINNAME:-$HOSTNAME}}"
|
||||||
SERVER_ADMIN="${SERVER_ADMIN:-root@${EMAIL_DOMAIN:-$FULL_DOMAIN_NAME}}"
|
SERVER_ADMIN="${SERVER_ADMIN:-root@${EMAIL_DOMAIN:-$FULL_DOMAIN_NAME}}"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# other
|
# other
|
||||||
|
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# php settings
|
# php settings
|
||||||
PHP_VERSION="${PHP_VERSION//php/}"
|
PHP_VERSION="${PHP_VERSION//php/}"
|
||||||
PHP_INI_DIR="${PHP_INI_DIR:-$(__find_php_ini)}"
|
PHP_INI_DIR="${PHP_INI_DIR:-$(__find_php_ini)}"
|
||||||
PHP_BIN_DIR="${PHP_BIN_DIR:-$(__find_php_bin)}"
|
PHP_BIN_DIR="${PHP_BIN_DIR:-$(__find_php_bin)}"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# postgresql env
|
# postgresql env
|
||||||
PGDATA="${DATABASE_DIR_PGSQL:-$PGDATA}"
|
PGDATA="${DATABASE_DIR_PGSQL:-$PGDATA}"
|
||||||
DATABASE_DIR_PGSQL="${DATABASE_DIR_PGSQL:-/data/db/postgres}"
|
DATABASE_DIR_PGSQL="${DATABASE_DIR_PGSQL:-/data/db/postgres}"
|
||||||
POSTGRES_USER="${DATABASE_USER_ROOT:-$POSTGRES_USER}"
|
POSTGRES_USER="${DATABASE_USER_ROOT:-$POSTGRES_USER}"
|
||||||
POSTGRES_PASSWORD="${DATABASE_PASS_ROOT:-$POSTGRES_PASSWORD}"
|
POSTGRES_PASSWORD="${DATABASE_PASS_ROOT:-$POSTGRES_PASSWORD}"
|
||||||
POSTGRES_CONFIG_FILE="${POSTGRES_CONFIG_FILE:-$(__find_pgsql_conf)}"
|
POSTGRES_CONFIG_FILE="${POSTGRES_CONFIG_FILE:-$(__find_pgsql_conf)}"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# redis env
|
# redis env
|
||||||
DATABASE_DIR_REDIS="${DATABASE_DIR_REDIS:-/data/db/redis}"
|
DATABASE_DIR_REDIS="${DATABASE_DIR_REDIS:-/data/db/redis}"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# services/ports
|
# services/ports
|
||||||
ENV_PORTS="${ENV_PORTS:-}"
|
ENV_PORTS="${ENV_PORTS:-}"
|
||||||
SERVICE_PORT="${SERVICE_PORT:-$PORT}"
|
SERVICE_PORT="${SERVICE_PORT:-$PORT}"
|
||||||
WEB_SERVER_PORTS="${WEB_SERVER_PORTS:-}"
|
WEB_SERVER_PORTS="${WEB_SERVER_PORTS:-}"
|
||||||
SERVICES_LIST="${PROCS_LIST:-$SERVICES_LIST} "
|
SERVICES_LIST="${PROCS_LIST:-$SERVICES_LIST} "
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# ssl server settings
|
# ssl server settings
|
||||||
SSL_ENABLED="${SSL_ENABLED:-false}"
|
SSL_ENABLED="${SSL_ENABLED:-false}"
|
||||||
SSL_DIR="${SSL_CONTAINER_DIR:-/config/ssl}"
|
SSL_DIR="${SSL_CONTAINER_DIR:-/config/ssl}"
|
||||||
@@ -6,7 +6,7 @@ SSL_DIR="${SSL_DIR:-$SSL_DIR}"
|
|||||||
SSL_CA="${SSL_CA:-$SSL_DIR/ca.crt}"
|
SSL_CA="${SSL_CA:-$SSL_DIR/ca.crt}"
|
||||||
SSL_KEY="${SSL_KEY:-$SSL_DIR/server.key}"
|
SSL_KEY="${SSL_KEY:-$SSL_DIR/server.key}"
|
||||||
SSL_CERT="${SSL_CERT:-$SSL_DIR/server.crt}"
|
SSL_CERT="${SSL_CERT:-$SSL_DIR/server.crt}"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# certificate settings
|
# certificate settings
|
||||||
RSA="${RSA:-4096}"
|
RSA="${RSA:-4096}"
|
||||||
STATE="${STATE:-NY}"
|
STATE="${STATE:-NY}"
|
||||||
@@ -16,4 +16,4 @@ UNIT="${UNIT:-CasjaysDev}"
|
|||||||
ORG="${ORG:-"Casjays Developments"}"
|
ORG="${ORG:-"Casjays Developments"}"
|
||||||
DAYS_VALID="${DAYS_VALID:-3650}"
|
DAYS_VALID="${DAYS_VALID:-3650}"
|
||||||
CN="${CN:-${FULL_DOMAIN_NAME:-$HOSTNAME}}"
|
CN="${CN:-${FULL_DOMAIN_NAME:-$HOSTNAME}}"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Supabase
|
# Supabase
|
||||||
DATABASE_DIR_SUPABASE="${DATABASE_DIR_SUPABASE:-/data/db/supabase}"
|
DATABASE_DIR_SUPABASE="${DATABASE_DIR_SUPABASE:-/data/db/supabase}"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# web server configs
|
# web server configs
|
||||||
HTTPD_CONFIG_FILE="${HTTPD_CONFIG_FILE:-$(__find_httpd_conf)}"
|
HTTPD_CONFIG_FILE="${HTTPD_CONFIG_FILE:-$(__find_httpd_conf)}"
|
||||||
NGINX_CONFIG_FILE="${NGINX_CONFIG_FILE:-$(__find_nginx_conf)}"
|
NGINX_CONFIG_FILE="${NGINX_CONFIG_FILE:-$(__find_nginx_conf)}"
|
||||||
CADDY_CONFIG_FILE="${CHEROKEE_CONFIG_FILE:-$(__find_caddy_conf)}"
|
CADDY_CONFIG_FILE="${CHEROKEE_CONFIG_FILE:-$(__find_caddy_conf)}"
|
||||||
LIGHTTPD_CONFIG_FILE="${LIGHTTPD_CONFIG_FILE:-$(__find_lighttpd_conf)}"
|
LIGHTTPD_CONFIG_FILE="${LIGHTTPD_CONFIG_FILE:-$(__find_lighttpd_conf)}"
|
||||||
CHEROKEE_CONFIG_FILE="${CHEROKEE_CONFIG_FILE:-$(__find_cherokee_conf)}"
|
CHEROKEE_CONFIG_FILE="${CHEROKEE_CONFIG_FILE:-$(__find_cherokee_conf)}"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# File locations
|
# File locations
|
||||||
ENTRYPOINT_PID_FILE="${ENTRYPOINT_PID_FILE:-/run/init.d/entrypoint.pid}"
|
ENTRYPOINT_PID_FILE="${ENTRYPOINT_PID_FILE:-/run/init.d/entrypoint.pid}"
|
||||||
ENTRYPOINT_INIT_FILE="${ENTRYPOINT_INIT_FILE:-/config/.entrypoint.done}"
|
ENTRYPOINT_INIT_FILE="${ENTRYPOINT_INIT_FILE:-/config/.entrypoint.done}"
|
||||||
ENTRYPOINT_DATA_INIT_FILE="${ENTRYPOINT_DATA_INIT_FILE:-/data/.docker_has_run}"
|
ENTRYPOINT_DATA_INIT_FILE="${ENTRYPOINT_DATA_INIT_FILE:-/data/.docker_has_run}"
|
||||||
ENTRYPOINT_CONFIG_INIT_FILE="${ENTRYPOINT_CONFIG_INIT_FILE:-/config/.docker_has_run}"
|
ENTRYPOINT_CONFIG_INIT_FILE="${ENTRYPOINT_CONFIG_INIT_FILE:-/config/.docker_has_run}"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Startup variables
|
# Startup variables
|
||||||
INIT_DATE="${INIT_DATE:-$(date)}"
|
INIT_DATE="${INIT_DATE:-$(date)}"
|
||||||
START_SERVICES="${START_SERVICES:-yes}"
|
START_SERVICES="${START_SERVICES:-yes}"
|
||||||
@@ -12,10 +12,10 @@ ENTRYPOINT_MESSAGE="${ENTRYPOINT_MESSAGE:-yes}"
|
|||||||
ENTRYPOINT_FIRST_RUN="${ENTRYPOINT_FIRST_RUN:-yes}"
|
ENTRYPOINT_FIRST_RUN="${ENTRYPOINT_FIRST_RUN:-yes}"
|
||||||
DATA_DIR_INITIALIZED="${DATA_DIR_INITIALIZED:-false}"
|
DATA_DIR_INITIALIZED="${DATA_DIR_INITIALIZED:-false}"
|
||||||
CONFIG_DIR_INITIALIZED="${CONFIG_DIR_INITIALIZED:-false}"
|
CONFIG_DIR_INITIALIZED="${CONFIG_DIR_INITIALIZED:-false}"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Check if this is a new container
|
# Check if this is a new container
|
||||||
[ -f "$ENTRYPOINT_PID_FILE" ] && START_SERVICES="no"
|
[ -f "$ENTRYPOINT_PID_FILE" ] && START_SERVICES="no"
|
||||||
[ -f "$ENTRYPOINT_CONFIG_INIT_FILE" ] && ENTRYPOINT_FIRST_RUN="no"
|
[ -f "$ENTRYPOINT_CONFIG_INIT_FILE" ] && ENTRYPOINT_FIRST_RUN="no"
|
||||||
[ -f "$ENTRYPOINT_DATA_INIT_FILE" ] && DATA_DIR_INITIALIZED="true"
|
[ -f "$ENTRYPOINT_DATA_INIT_FILE" ] && DATA_DIR_INITIALIZED="true"
|
||||||
[ -f "$ENTRYPOINT_CONFIG_INIT_FILE" ] && CONFIG_DIR_INITIALIZED="true"
|
[ -f "$ENTRYPOINT_CONFIG_INIT_FILE" ] && CONFIG_DIR_INITIALIZED="true"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|||||||
Reference in New Issue
Block a user