mirror of
https://github.com/casjaysdevdocker/caddy
synced 2025-09-19 15:57:39 -04:00
🗃️ Committing everything that changed 🗃️
This commit is contained in:
284
rootfs/usr/local/bin/entrypoint.sh
Executable file
284
rootfs/usr/local/bin/entrypoint.sh
Executable file
@@ -0,0 +1,284 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck shell=bash
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
##@Version : 202210201558-git
|
||||
# @@Author : Jason Hempstead
|
||||
# @@Contact : jason@casjaysdev.com
|
||||
# @@License : LICENSE.md
|
||||
# @@ReadME : entrypoint.sh --help
|
||||
# @@Copyright : Copyright: (c) 2022 Jason Hempstead, Casjays Developments
|
||||
# @@Created : Thursday, Oct 20, 2022 15:58 EDT
|
||||
# @@File : entrypoint.sh
|
||||
# @@Description : entrypoint point for caddy
|
||||
# @@Changelog : New script
|
||||
# @@TODO : Better documentation
|
||||
# @@Other :
|
||||
# @@Resource :
|
||||
# @@Terminal App : no
|
||||
# @@sudo/root : no
|
||||
# @@Template : other/docker-entrypoint
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Set bash options
|
||||
[ -n "$DEBUG" ] && set -x
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Set functions
|
||||
__exec_command() {
|
||||
local exitCode=0
|
||||
local cmd="${*:-bash -l}"
|
||||
echo "${exec_message:-Executing command: $cmd}"
|
||||
$cmd || exitCode=1
|
||||
[ "$exitCode" = 0 ] || exitCode=10
|
||||
return ${exitCode:-$?}
|
||||
}
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
__pcheck() { [ -n "$(which pgrep 2>/dev/null)" ] && pgrep -x "$1" || return 1; }
|
||||
__find() { find "$1" -mindepth 1 -type ${2:-f,d} 2>/dev/null | grep '^' || return 10; }
|
||||
__curl() { curl -q -LSsf -o /dev/null -s -w "200" "$@" 2>/dev/null || return 10; }
|
||||
__pgrep() { __pcheck "${1:-$SERVICE_NAME}" || ps aux 2>/dev/null | grep -Fw " ${1:-$SERVICE_NAME}" | grep -qv ' grep' || return 10; }
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
__certbot() {
|
||||
[ -n "$DOMANNAME" ] && [ -n "$CERT_BOT_MAIL" ] || { echo "The variables DOMANNAME and CERT_BOT_MAIL are set" && exit 1; }
|
||||
[ "$SSL_CERT_BOT" = "true" ] && type -P certbot &>/dev/null || { export SSL_CERT_BOT="" && return 10; }
|
||||
certbot $1 --agree-tos -m $CERT_BOT_MAIL certonly --webroot -w "${WWW_ROOT_DIR:-/data/htdocs/www}" -d $DOMAINNAME -d $DOMAINNAME \
|
||||
--put-all-related-files-into "$SSL_DIR" -key-path "$SSL_KEY" -fullchain-path "$SSL_CERT"
|
||||
}
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
__heath_check() {
|
||||
status=0 health="Good"
|
||||
__pgrep ${1:-} || status=$((status + 1))
|
||||
#__curl "https://1.1.1.1" || status=$((status + 1))
|
||||
#__curl "http://localhost:$HTTP_PORT/server-health" || status=$((status + 1))
|
||||
[ "$status" -eq 0 ] || health="Errors reported see docker logs --follow $CONTAINER_NAME"
|
||||
echo "$(uname -s) $(uname -m) is running and the health is: $health"
|
||||
return ${status:-$?}
|
||||
}
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
__start_all_services() {
|
||||
echo "$service_message"
|
||||
start-fpm &
|
||||
start-caddy
|
||||
return $?
|
||||
}
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Additional functions
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# export functions
|
||||
export -f __exec_command __pcheck __pgrep __find __curl __heath_check __certbot __start_all_services
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Define default variables - do not change these - redefine with -e or set under Additional
|
||||
DISPLAY="${DISPLAY:-}"
|
||||
LANG="${LANG:-C.UTF-8}"
|
||||
DOMAINNAME="${DOMAINNAME:-}"
|
||||
TZ="${TZ:-America/New_York}"
|
||||
HTTP_PORT="${HTTP_PORT:-80}"
|
||||
HTTPS_PORT="${HTTPS_PORT:-}"
|
||||
SERVICE_PORT="${SERVICE_PORT:-}"
|
||||
SERVICE_NAME="${CONTAINER_NAME:-}"
|
||||
HOSTNAME="${HOSTNAME:-casjaysdev-caddy}"
|
||||
HOSTADMIN="${HOSTADMIN:-root@${DOMAINNAME:-$HOSTNAME}}"
|
||||
CERT_BOT_MAIL="${CERT_BOT_MAIL:-certbot-mail@casjay.net}"
|
||||
SSL_CERT_BOT="${SSL_CERT_BOT:-false}"
|
||||
SSL_ENABLED="${SSL_ENABLED:-false}"
|
||||
SSL_DIR="${SSL_DIR:-/config/ssl}"
|
||||
SSL_CA="${SSL_CA:-$SSL_DIR/ca.crt}"
|
||||
SSL_KEY="${SSL_KEY:-$SSL_DIR/server.key}"
|
||||
SSL_CERT="${SSL_CERT:-$SSL_DIR/server.crt}"
|
||||
SSL_CONTAINER_DIR="${SSL_CONTAINER_DIR:-/etc/ssl/CA}"
|
||||
WWW_ROOT_DIR="${WWW_ROOT_DIR:-/data/htdocs}"
|
||||
LOCAL_BIN_DIR="${LOCAL_BIN_DIR:-/usr/local/bin}"
|
||||
DEFAULT_DATA_DIR="${DEFAULT_DATA_DIR:-/usr/local/share/template-files/data}"
|
||||
DEFAULT_CONF_DIR="${DEFAULT_CONF_DIR:-/usr/local/share/template-files/config}"
|
||||
DEFAULT_TEMPLATE_DIR="${DEFAULT_TEMPLATE_DIR:-/usr/local/share/template-files/defaults}"
|
||||
CONTAINER_IP_ADDRESS="$(ip a 2>/dev/null | grep 'inet' | grep -v '127.0.0.1' | awk '{print $2}' | sed 's|/.*||g')"
|
||||
[ -n "$HTTP_PORT" ] || [ -n "$HTTPS_PORT" ] || HTTP_PORT="$SERVICE_PORT"
|
||||
[ "$HTTPS_PORT" = "443" ] && HTTP_PORT="$HTTPS_PORT" && SSL_ENABLED="true"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Additional variables and variable overrides
|
||||
#SERVICE_NAME=""
|
||||
export service_message="Starting $CONTAINER_NAME"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Check if this is a new container
|
||||
[ -f "/data/.docker_has_run" ] && DATA_DIR_INITIALIZED="true" || DATA_DIR_INITIALIZED="false"
|
||||
[ -f "/config/.docker_has_run" ] && CONFIG_DIR_INITIALIZED="true" || CONFIG_DIR_INITIALIZED="false"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# export variables
|
||||
export LANG TZ DOMAINNAME HOSTNAME HOSTADMIN SSL_ENABLED SSL_DIR SSL_CA SSL_KEY SERVICE_NAME
|
||||
export SSL_DIR HTTP_PORT HTTPS_PORT LOCAL_BIN_DIR DEFAULT_CONF_DIR CONTAINER_IP_ADDRESS
|
||||
export SSL_CONTAINER_DIR SSL_CERT_BOT DISPLAY CONFIG_DIR_INITIALIZED DATA_DIR_INITIALIZED
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# import variables from file
|
||||
[ -f "/root/env.sh" ] && . "/root/env.sh"
|
||||
[ -f "/config/env.sh" ] && "/config/env.sh"
|
||||
[ -f "/config/.env.sh" ] && . "/config/.env.sh"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Set timezone
|
||||
[ -n "$TZ" ] && echo "$TZ" >"/etc/timezone"
|
||||
[ -f "/usr/share/zoneinfo/$TZ" ] && ln -sf "/usr/share/zoneinfo/$TZ" "/etc/localtime"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Set hostname
|
||||
if [ -n "$HOSTNAME" ]; then
|
||||
echo "$HOSTNAME" >"/etc/hostname"
|
||||
echo "127.0.0.1 $HOSTNAME localhost $HOSTNAME.local" >"/etc/hosts"
|
||||
fi
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Add domain to hosts file
|
||||
if [ -n "$DOMAINNAME" ]; then
|
||||
echo "$HOSTNAME.${DOMAINNAME:-local}" >"/etc/hostname"
|
||||
echo "127.0.0.1 $HOSTNAME localhost $HOSTNAME.local" >"/etc/hosts"
|
||||
echo "${CONTAINER_IP_ADDRESS:-127.0.0.1} $HOSTNAME.$DOMAINNAME" >>"/etc/hosts"
|
||||
fi
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Delete any gitkeep files
|
||||
[ -d "/data" ] && rm -Rf "/data/.gitkeep" "/data"/*/*.gitkeep
|
||||
[ -d "/config" ] && rm -Rf "/config/.gitkeep" "/data"/*/*.gitkeep
|
||||
[ -f "/usr/local/bin/.gitkeep" ] && rm -Rf "/usr/local/bin/.gitkeep"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Create directories
|
||||
[ -d "/etc/ssl" ] || mkdir -p "$SSL_CONTAINER_DIR"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Create files
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Create symlinks
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
if [ "$SSL_ENABLED" = "true" ] || [ "$SSL_ENABLED" = "yes" ]; then
|
||||
if [ -f "/config/ssl/server.crt" ] && [ -f "/config/ssl/server.key" ]; then
|
||||
export SSL_ENABLED="true"
|
||||
if [ -n "$SSL_CA" ] && [ -f "$SSL_CA" ]; then
|
||||
mkdir -p "$SSL_CONTAINER_DIR/certs"
|
||||
cat "$SSL_CA" >>"/etc/ssl/certs/ca-certificates.crt"
|
||||
cp -Rf "/config/ssl/." "$SSL_CONTAINER_DIR/"
|
||||
fi
|
||||
else
|
||||
[ -d "$SSL_DIR" ] || mkdir -p "$SSL_DIR"
|
||||
create-ssl-cert
|
||||
fi
|
||||
type update-ca-certificates &>/dev/null && update-ca-certificates
|
||||
fi
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
[ -f "$SSL_CA" ] && cp -Rfv "$SSL_CA" "$SSL_CONTAINER_DIR/ca.crt"
|
||||
[ -f "$SSL_KEY" ] && cp -Rfv "$SSL_KEY" "$SSL_CONTAINER_DIR/server.key"
|
||||
[ -f "$SSL_CERT" ] && cp -Rfv "$SSL_CERT" "$SSL_CONTAINER_DIR/server.crt"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Setup bin directory
|
||||
SET_USR_BIN=""
|
||||
[ -d "/data/bin" ] && SET_USR_BIN+="$(__find /data/bin f) "
|
||||
[ -d "/config/bin" ] && SET_USR_BIN+="$(__find /config/bin f) "
|
||||
if [ -n "$SET_USR_BIN" ]; then
|
||||
echo "Setting up bin"
|
||||
for create_bin in $SET_USR_BIN; do
|
||||
create_bin_name="$(basename "$create_bin")"
|
||||
ln -sf "$create_bin" "$LOCAL_BIN_DIR/$create_bin_name"
|
||||
done
|
||||
fi
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Create default config
|
||||
if [ "$CONFIG_DIR_INITIALIZED" = "false" ] && [ -d "/config" ]; then
|
||||
echo "Copying default config files"
|
||||
if [ -n "$DEFAULT_TEMPLATE_DIR" ] && [ -d "$DEFAULT_TEMPLATE_DIR" ]; then
|
||||
for create_template in "$DEFAULT_TEMPLATE_DIR"/*; do
|
||||
create_template_name="$(basename "$create_template")"
|
||||
cp -Rf "$create_template" "/config/$create_template_name" 2>/dev/null
|
||||
done
|
||||
fi
|
||||
fi
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Copy custom config files
|
||||
if [ "$CONFIG_DIR_INITIALIZED" = "false" ] && [ -d "/config" ]; then
|
||||
echo "Copying custom config files"
|
||||
for create_config in "$DEFAULT_CONF_DIR"/*; do
|
||||
create_config_name="$(basename "$create_config")"
|
||||
cp -Rf "$create_config" "/config/$create_config_name" 2>/dev/null
|
||||
done
|
||||
fi
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Copy custom data files
|
||||
if [ "$DATA_DIR_INITIALIZED" = "false" ] && [ -d "/data" ]; then
|
||||
echo "Copying data files"
|
||||
for create_data in "$DEFAULT_DATA_DIR"/*; do
|
||||
create_data_name="$(basename "$create_data")"
|
||||
cp -Rf "$create_data" "/data/$create_data_name" 2>/dev/null
|
||||
done
|
||||
fi
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Copy /config to /etc
|
||||
if [ -d "/config" ]; then
|
||||
echo "Copying /config to /etc"
|
||||
for create_conf in /config/*; do
|
||||
if [ -n "$create_conf" ]; then
|
||||
create_conf_name="$(basename "$create_conf")"
|
||||
if [ -e "/etc/$create_conf_name" ]; then
|
||||
if [ -d "/etc/$create_conf_name" ]; then
|
||||
cp -Rf "$create_conf/." "/etc/$create_conf_name/" 2>/dev/null
|
||||
else
|
||||
cp -Rf "$create_conf" "/etc/$create_conf_name" 2>/dev/null
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Unset unneeded variables
|
||||
unset SET_USR_BIN create_bin create_bin_name create_template create_template_name
|
||||
unset create_data create_data_name create_config create_config_name create_conf create_conf_name
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
[ -f "/data/.docker_has_run" ] || { [ -d "/data" ] && echo "Initialized on: $(date)" >"/data/.docker_has_run"; }
|
||||
[ -f "/config/.docker_has_run" ] || { [ -d "/config" ] && echo "Initialized on: $(date)" >"/config/.docker_has_run"; }
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Additional commands
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Show message
|
||||
echo "Container ip address is: $CONTAINER_IP_ADDRESS"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
case "$1" in
|
||||
--help) # Help message
|
||||
echo 'Docker container for '$APPNAME''
|
||||
echo "Usage: $APPNAME [healthcheck, bash, command]"
|
||||
echo "Failed command will have exit code 10"
|
||||
echo ""
|
||||
exit ${exitCode:-$?}
|
||||
;;
|
||||
|
||||
healthcheck) # Docker healthcheck
|
||||
__heath_check "${1:-$SERVICE_NAME}" || exitCode=10
|
||||
exit ${exitCode:-$?}
|
||||
;;
|
||||
|
||||
*/bin/sh | */bin/bash | bash | shell | sh) # Launch shell
|
||||
shift 1
|
||||
__exec_command "${@:-/bin/bash}"
|
||||
exit ${exitCode:-$?}
|
||||
;;
|
||||
|
||||
certbot)
|
||||
shift 1
|
||||
SSL_CERT_BOT="true"
|
||||
if [ "$1" = "create" ]; then
|
||||
shift 1
|
||||
__certbot
|
||||
elif [ "$1" = "renew" ]; then
|
||||
shift 1
|
||||
__certbot "renew certonly --force-renew"
|
||||
else
|
||||
__exec_command "certbot" "$@"
|
||||
fi
|
||||
;;
|
||||
|
||||
*) # Execute primary command
|
||||
if [ $# -eq 0 ]; then
|
||||
__start_all_services
|
||||
exit ${exitCode:-$?}
|
||||
else
|
||||
__exec_command "$@"
|
||||
exitCode=$?
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# end of entrypoint
|
||||
exit ${exitCode:-$?}
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
160
rootfs/usr/local/bin/start-caddy.sh
Executable file
160
rootfs/usr/local/bin/start-caddy.sh
Executable file
@@ -0,0 +1,160 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck shell=bash
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
##@Version : 202210201558-git
|
||||
# @@Author : Jason Hempstead
|
||||
# @@Contact : jason@casjaysdev.com
|
||||
# @@License : LICENSE.md
|
||||
# @@ReadME : start-caddy.sh --help
|
||||
# @@Copyright : Copyright: (c) 2022 Jason Hempstead, Casjays Developments
|
||||
# @@Created : Thursday, Oct 20, 2022 15:58 EDT
|
||||
# @@File : start-caddy.sh
|
||||
# @@Description : script to start caddy
|
||||
# @@Changelog : New script
|
||||
# @@TODO : Better documentation
|
||||
# @@Other :
|
||||
# @@Resource :
|
||||
# @@Terminal App : no
|
||||
# @@sudo/root : no
|
||||
# @@Template : other/start-service
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Set functions
|
||||
__pcheck() { [ -n "$(which pgrep 2>/dev/null)" ] && pgrep -x "$1" || return 1; }
|
||||
__find() { find "$1" -mindepth 1 -type ${2:-f,d} 2>/dev/null | grep '^' || return 10; }
|
||||
__curl() { curl -q -LSsf -o /dev/null -s -w "200" "$@" 2>/dev/null || return 10; }
|
||||
__pgrep() { __pcheck "$1" || ps aux 2>/dev/null | grep -Fw " $1" | grep -qv ' grep' || return 10; }
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
__certbot() {
|
||||
[ -n "$DOMANNAME" ] && [ -n "$CERT_BOT_MAIL" ] || { echo "The variables DOMANNAME and CERT_BOT_MAIL are set" && exit 1; }
|
||||
[ "$SSL_CERT_BOT" = "true" ] && type -P certbot &>/dev/null || { export SSL_CERT_BOT="" && return 10; }
|
||||
certbot $1 --agree-tos -m $CERT_BOT_MAIL certonly --webroot -w "${WWW_ROOT_DIR:-/data/htdocs/www}" -d $DOMAINNAME -d $DOMAINNAME \
|
||||
--put-all-related-files-into "$SSL_DIR" -key-path "$SSL_KEY" -fullchain-path "$SSL_CERT"
|
||||
}
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
__heath_check() {
|
||||
status=0 health="Good"
|
||||
__pgrep ${1:-} || status=$((status + 1))
|
||||
#__curl "http://localhost:$HTTP_PORT/server-health" || status=$((status + 1))
|
||||
[ "$status" -eq 0 ] || health="Errors reported see docker logs --follow $CONTAINER_NAME"
|
||||
echo "$(uname -s) $(uname -m) is running and the health is: $health"
|
||||
return ${status:-$?}
|
||||
}
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Set variables
|
||||
DISPLAY="${DISPLAY:-}"
|
||||
LANG="${LANG:-C.UTF-8}"
|
||||
DOMAINNAME="${DOMAINNAME:-}"
|
||||
TZ="${TZ:-America/New_York}"
|
||||
HTTP_PORT="${HTTP_PORT:-80}"
|
||||
HTTPS_PORT="${HTTPS_PORT:-}"
|
||||
SERVICE_PORT="${SERVICE_PORT:-$HTTP_PORT}"
|
||||
SERVICE_NAME="${CONTAINER_NAME:-}"
|
||||
HOSTNAME="${HOSTNAME:-casjaysdev-caddy}"
|
||||
HOSTADMIN="${HOSTADMIN:-root@${DOMAINNAME:-$HOSTNAME}}"
|
||||
SSL_CERT_BOT="${SSL_CERT_BOT:-false}"
|
||||
SSL_ENABLED="${SSL_ENABLED:-false}"
|
||||
SSL_DIR="${SSL_DIR:-/config/ssl}"
|
||||
SSL_CA="${SSL_CA:-$SSL_DIR/ca.crt}"
|
||||
SSL_KEY="${SSL_KEY:-$SSL_DIR/server.key}"
|
||||
SSL_CERT="${SSL_CERT:-$SSL_DIR/server.crt}"
|
||||
SSL_CONTAINER_DIR="${SSL_CONTAINER_DIR:-/etc/ssl/CA}"
|
||||
WWW_ROOT_DIR="${WWW_ROOT_DIR:-/data/htdocs}"
|
||||
LOCAL_BIN_DIR="${LOCAL_BIN_DIR:-/usr/local/bin}"
|
||||
DATA_DIR_INITIALIZED="${DATA_DIR_INITIALIZED:-}"
|
||||
CONFIG_DIR_INITIALIZED="${CONFIG_DIR_INITIALIZED:-}"
|
||||
DEFAULT_DATA_DIR="${DEFAULT_DATA_DIR:-/usr/local/share/template-files/data}"
|
||||
DEFAULT_CONF_DIR="${DEFAULT_CONF_DIR:-/usr/local/share/template-files/config}"
|
||||
DEFAULT_TEMPLATE_DIR="${DEFAULT_TEMPLATE_DIR:-/usr/local/share/template-files/defaults}"
|
||||
CONTAINER_IP_ADDRESS="$(ip a 2>/dev/null | grep 'inet' | grep -v '127.0.0.1' | awk '{print $2}' | sed 's|/.*||g')"
|
||||
[ -n "$HTTP_PORT" ] || [ -n "$HTTPS_PORT" ] || HTTP_PORT="$SERVICE_PORT"
|
||||
[ "$HTTPS_PORT" = "443" ] && HTTP_PORT="$HTTPS_PORT" && SSL_ENABLED="true"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Overwrite variables
|
||||
#SERVICE_PORT=""
|
||||
SERVICE_NAME="caddy"
|
||||
SERVICE_COMMAND="$SERVICE_NAME -conf /etc/caddy/Caddyfile"
|
||||
export exec_message="Starting $SERVICE_NAME on $CONTAINER_IP_ADDRESS:$SERVICE_PORT"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Pre copy commands
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Check if this is a new container
|
||||
[ -z "$DATA_DIR_INITIALIZED" ] && [ -f "/data/.docker_has_run" ] && DATA_DIR_INITIALIZED="true"
|
||||
[ -z "$CONFIG_DIR_INITIALIZED" ] && [ -f "/config/.docker_has_run" ] && CONFIG_DIR_INITIALIZED="true"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Create default config
|
||||
if [ "$CONFIG_DIR_INITIALIZED" = "false" ] && [ -n "$DEFAULT_TEMPLATE_DIR" ]; then
|
||||
[ -d "/config" ] && cp -Rf "$DEFAULT_TEMPLATE_DIR/." "/config/" 2>/dev/null
|
||||
fi
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Copy custom config files
|
||||
if [ "$CONFIG_DIR_INITIALIZED" = "false" ] && [ -n "$DEFAULT_CONF_DIR" ]; then
|
||||
[ -d "/config" ] && cp -Rf "$DEFAULT_CONF_DIR/." "/config/" 2>/dev/null
|
||||
fi
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Copy custom data files
|
||||
if [ "$DATA_DIR_INITIALIZED" = "false" ] && [ -n "$DEFAULT_DATA_DIR" ]; then
|
||||
[ -d "/data" ] && cp -Rf "$DEFAULT_DATA_DIR/." "/data/" 2>/dev/null
|
||||
fi
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Copy html files
|
||||
if [ "$DATA_DIR_INITIALIZED" = "false" ] && [ -d "$DEFAULT_DATA_DIR/data/htdocs" ]; then
|
||||
[ -d "/data" ] && cp -Rf "$DEFAULT_DATA_DIR/data/htdocs/." "$WWW_ROOT_DIR/" 2>/dev/null
|
||||
fi
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Post copy commands
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Initialized
|
||||
[ -d "/data" ] && touch "/data/.docker_has_run"
|
||||
[ -d "/config" ] && touch "/config/.docker_has_run"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# APP Variables overrides
|
||||
[ -f "/root/env.sh" ] && . "/root/env.sh"
|
||||
[ -f "/config/env.sh" ] && "/config/env.sh"
|
||||
[ -f "/config/.env.sh" ] && . "/config/.env.sh"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Actions based on env
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# begin main app
|
||||
case "$1" in
|
||||
healthcheck)
|
||||
shift 1
|
||||
__heath_check "${SERVICE_NAME:-bash}"
|
||||
exit $?
|
||||
;;
|
||||
|
||||
certbot)
|
||||
shift 1
|
||||
SSL_CERT_BOT="true"
|
||||
if [ "$1" = "create" ]; then
|
||||
shift 1
|
||||
__certbot
|
||||
elif [ "$1" = "renew" ]; then
|
||||
shift 1
|
||||
__certbot "renew certonly --force-renew"
|
||||
else
|
||||
__exec_command "certbot" "$@"
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
if __pgrep "$SERVICE_NAME" && [ ! -f "/tmp/$SERVICE_NAME.pid" ]; then
|
||||
echo "$SERVICE_NAME is running"
|
||||
else
|
||||
touch "/tmp/$SERVICE_NAME.pid"
|
||||
__exec_command "$SERVICE_COMMAND" || rm -Rf "/tmp/$SERVICE_NAME.pid"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Set exit code
|
||||
exitCode="${exitCode:-$?}"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# End application
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# lets exit with code
|
||||
exit ${exitCode:-$?}
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# end
|
@@ -0,0 +1,7 @@
|
||||
|
||||
:80 {
|
||||
root * /data/htdocs/www
|
||||
file_server
|
||||
#reverse_proxy localhost:8080
|
||||
php_fastcgi localhost:9000
|
||||
}
|
@@ -0,0 +1,73 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="generator" content="CasjaysDev" />
|
||||
<meta name="robots" content="index, follow" />
|
||||
<meta name="description" content="" />
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0"
|
||||
/>
|
||||
|
||||
<meta property="og:title" content="" />
|
||||
<meta property="og:type" content="" />
|
||||
<meta property="og:url" content="" />
|
||||
<meta property="og:image" content="" />
|
||||
|
||||
<meta name="theme-color" content="#fafafa" />
|
||||
<link rel="manifest" href="./site.webmanifest" />
|
||||
|
||||
<link rel="icon" sizes="any" href="./images/favicon.ico" />
|
||||
<link rel="icon" type="image/svg+xml" href="./images/icon.svg" />
|
||||
<link rel="apple-touch-icon" href="./images/icon.png" />
|
||||
|
||||
<link rel="stylesheet" href="./css/index.css" />
|
||||
<link rel="stylesheet" href="./css/errorpages.css" />
|
||||
|
||||
<script src="./js/errorpages/isup.js" defer></script>
|
||||
<script src="./js/errorpages/homepage.js" defer></script>
|
||||
<script src="./js/errorpages/loaddomain.js" defer></script>
|
||||
<script src="./js/jquery/default.js"></script>
|
||||
<script src="./js/passprotect.min.js" defer></script>
|
||||
<script src="./js/bootstrap.min.js" defer></script>
|
||||
<script src="./js/app.js" defer></script>
|
||||
|
||||
<title>404 Not Found</title>
|
||||
</head>
|
||||
|
||||
<body onload="javascript:loadDomain();">
|
||||
<!-- Error Page Content -->
|
||||
<div class="container vh-100">
|
||||
<div class="jumbotron">
|
||||
<h1>
|
||||
<i class="fa fa-frown-o red"></i>
|
||||
<a
|
||||
href="https://www.google.com/search?q=server+error+404"
|
||||
target="_blank"
|
||||
>404 Not Found</a
|
||||
>
|
||||
</h1>
|
||||
<p class="lead">
|
||||
We apologize but we can't seem to be able to find what you're looking
|
||||
for!
|
||||
</p>
|
||||
|
||||
<img
|
||||
alt="error"
|
||||
src="./images/404.gif"
|
||||
height="350"
|
||||
width="auto"
|
||||
/><br />
|
||||
</div>
|
||||
|
||||
<a
|
||||
onclick="javascript:homepage();"
|
||||
class="btn btn-secondary btn-outline-danger btn-lg btn-block"
|
||||
><span id="display-domain"></span
|
||||
></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
10531
rootfs/usr/local/share/template-files/data/htdocs/www/css/bootstrap.min.css
vendored
Normal file
10531
rootfs/usr/local/share/template-files/data/htdocs/www/css/bootstrap.min.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,342 @@
|
||||
@import url(
|
||||
https://fonts.googleapis.com/css?family=Lato:300italic,
|
||||
700italic,
|
||||
300,
|
||||
700
|
||||
);
|
||||
|
||||
body {
|
||||
padding: 50px;
|
||||
font: 14px/1.5 Lato, "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
color: #777;
|
||||
font-weight: 300;
|
||||
padding: 1.5em 0;
|
||||
}
|
||||
|
||||
/* Layout */
|
||||
.jumbotron {
|
||||
line-height: 2.1428571435;
|
||||
color: inherit;
|
||||
padding: 10px 0px;
|
||||
}
|
||||
|
||||
/* Main marketing message and sign up button */
|
||||
.jumbotron {
|
||||
text-align: center;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.jumbotron .btn {
|
||||
font-size: 21px;
|
||||
padding: 1.5em 2em;
|
||||
}
|
||||
|
||||
/* Everything but the jumbotron gets side spacing for mobile-first views */
|
||||
.masthead,
|
||||
.body-content {
|
||||
padding: 0 15px;
|
||||
}
|
||||
|
||||
/* Colors */
|
||||
.green {
|
||||
color: green;
|
||||
}
|
||||
|
||||
.orange {
|
||||
color: orange;
|
||||
}
|
||||
|
||||
.red {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.blue {
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.yellow {
|
||||
color: yellow;
|
||||
}
|
||||
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
color: #222;
|
||||
margin: 0 0 40px;
|
||||
}
|
||||
|
||||
p,
|
||||
ul,
|
||||
ol,
|
||||
table,
|
||||
pre,
|
||||
dl {
|
||||
margin: 0 0 20px;
|
||||
}
|
||||
|
||||
h2,
|
||||
h3 {
|
||||
line-height: 1.1;
|
||||
}
|
||||
|
||||
h1 {
|
||||
line-height: 1.1;
|
||||
text-align: center;
|
||||
font: Lato;
|
||||
font-size: 80px;
|
||||
color: #222;
|
||||
margin: 0 0 40px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
color: #393939;
|
||||
}
|
||||
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
color: #494949;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #39c;
|
||||
font-weight: 400;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a small {
|
||||
font-size: 11px;
|
||||
color: #777;
|
||||
margin-top: -0.6em;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
width: 860px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
border-left: 1px solid #e5e5e5;
|
||||
margin: 0;
|
||||
padding: 0 0 0 20px;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.btn-block {
|
||||
width: 40%;
|
||||
text-align: center;
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
code,
|
||||
pre {
|
||||
font-family: Monaco, Bitstream Vera Sans Mono, Lucida Console, Terminal;
|
||||
color: #333;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
pre {
|
||||
padding: 8px 15px;
|
||||
background: #f8f8f8;
|
||||
border-radius: 5px;
|
||||
border: 1px solid #e5e5e5;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
th,
|
||||
td {
|
||||
text-align: left;
|
||||
padding: 5px 10px;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
}
|
||||
|
||||
dt {
|
||||
color: #444;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
th {
|
||||
color: #444;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
header {
|
||||
width: 270px;
|
||||
float: left;
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
header ul {
|
||||
list-style: none;
|
||||
height: 40px;
|
||||
|
||||
padding: 0;
|
||||
|
||||
background: #eee;
|
||||
background: -moz-linear-gradient(top, #f8f8f8 0%, #dddddd 100%);
|
||||
background: -webkit-gradient(
|
||||
linear,
|
||||
left top,
|
||||
left bottom,
|
||||
color-stop(0%, #f8f8f8),
|
||||
color-stop(100%, #dddddd)
|
||||
);
|
||||
background: -webkit-linear-gradient(top, #f8f8f8 0%, #dddddd 100%);
|
||||
background: -o-linear-gradient(top, #f8f8f8 0%, #dddddd 100%);
|
||||
background: -ms-linear-gradient(top, #f8f8f8 0%, #dddddd 100%);
|
||||
background: linear-gradient(top, #f8f8f8 0%, #dddddd 100%);
|
||||
|
||||
border-radius: 5px;
|
||||
border: 1px solid #d2d2d2;
|
||||
box-shadow: inset #fff 0 1px 0, inset rgba(0, 0, 0, 0.03) 0 -1px 0;
|
||||
width: 270px;
|
||||
}
|
||||
|
||||
header li {
|
||||
width: 89px;
|
||||
float: left;
|
||||
border-right: 1px solid #d2d2d2;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
header ul a {
|
||||
line-height: 1;
|
||||
font-size: 11px;
|
||||
color: #999;
|
||||
display: block;
|
||||
text-align: center;
|
||||
padding-top: 6px;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
strong {
|
||||
color: #222;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
header ul li + li {
|
||||
width: 88px;
|
||||
border-left: 1px solid #fff;
|
||||
}
|
||||
|
||||
header ul li + li + li {
|
||||
border-right: none;
|
||||
width: 89px;
|
||||
}
|
||||
|
||||
header ul a strong {
|
||||
font-size: 14px;
|
||||
display: block;
|
||||
color: #222;
|
||||
}
|
||||
|
||||
section {
|
||||
width: 500px;
|
||||
float: right;
|
||||
padding-bottom: 50px;
|
||||
}
|
||||
|
||||
small {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
hr {
|
||||
border: 0;
|
||||
background: #e5e5e5;
|
||||
height: 1px;
|
||||
margin: 0 0 20px;
|
||||
}
|
||||
|
||||
footer {
|
||||
width: 270px;
|
||||
float: left;
|
||||
position: fixed;
|
||||
bottom: 50px;
|
||||
}
|
||||
|
||||
@media print, screen and (max-width: 960px) {
|
||||
div.wrapper {
|
||||
width: auto;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
header,
|
||||
section,
|
||||
footer {
|
||||
float: none;
|
||||
position: static;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
header {
|
||||
padding-right: 320px;
|
||||
}
|
||||
|
||||
section {
|
||||
border: 1px solid #e5e5e5;
|
||||
border-width: 1px 0;
|
||||
padding: 20px 0;
|
||||
margin: 0 0 20px;
|
||||
}
|
||||
|
||||
header a small {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
header ul {
|
||||
position: absolute;
|
||||
right: 50px;
|
||||
top: 52px;
|
||||
}
|
||||
}
|
||||
|
||||
@media print, screen and (max-width: 720px) {
|
||||
body {
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
header {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
header ul,
|
||||
header p.view {
|
||||
position: static;
|
||||
}
|
||||
|
||||
pre,
|
||||
code {
|
||||
word-wrap: normal;
|
||||
}
|
||||
}
|
||||
|
||||
@media print, screen and (max-width: 480px) {
|
||||
body {
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
header ul {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media print {
|
||||
body {
|
||||
padding: 0.4in;
|
||||
font-size: 12pt;
|
||||
color: #444;
|
||||
}
|
||||
}
|
@@ -0,0 +1,79 @@
|
||||
@import url(http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700);
|
||||
@import url(./bootstrap.min.css);
|
||||
|
||||
body {
|
||||
color: purple;
|
||||
background-image: url('../images/bg.png');
|
||||
}
|
||||
|
||||
th {
|
||||
background-color: #333;
|
||||
color: #ffffff;
|
||||
border-top: 1px solid #678ca0;
|
||||
vertical-align: middle;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
td {
|
||||
background-color: 333;
|
||||
border-top: 1px solid #678ca0;
|
||||
}
|
||||
|
||||
.box {
|
||||
border: 1px solid #678ca0;
|
||||
padding: 0px;
|
||||
width: 100%;
|
||||
background-color: #333;
|
||||
margin-bottom: 10px;
|
||||
width: 600px;
|
||||
}
|
||||
|
||||
.spacer {
|
||||
margin: 0px;
|
||||
width: 100%;
|
||||
background-color: #333;
|
||||
}
|
||||
|
||||
.leftspacer {
|
||||
margin: 0px;
|
||||
padding: 5px;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
background-color: #333;
|
||||
}
|
||||
|
||||
.serviceup {
|
||||
color: green;
|
||||
}
|
||||
|
||||
.servicedown {
|
||||
color: red;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: #5d83a9;
|
||||
}
|
||||
|
||||
p.main {
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
text-align: center;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
a:visited {
|
||||
color: #c39;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #f00;
|
||||
}
|
||||
|
||||
a:active {
|
||||
color: #c0f;
|
||||
}
|
||||
|
||||
tr:hover {
|
||||
background-color: #f5f5f5;
|
||||
}
|
@@ -0,0 +1 @@
|
||||
./images/favicon.ico
|
Binary file not shown.
After Width: | Height: | Size: 35 KiB |
Binary file not shown.
After Width: | Height: | Size: 93 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
After Width: | Height: | Size: 766 B |
Binary file not shown.
After Width: | Height: | Size: 3.9 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 192 192"><path fill="#e08524" d="M75.3 73.4H18.4l45.3 34.3L48.3 163l46.1-32.3 48.2 34.6-16.9-58.3 44.9-33.6H115l-20.5-55-19.2 55z"/><path d="m96.7 18.8 18.2 8.2 16.5 44.3h-15.1L96.7 18.8zm-47 146 18.7 9.9 42.6-29.9-16.5-11.4-44.8 31.4zm79.1-56.8 17.4 9.4 18.6 60.1-19.7-11.3-16.3-58.2z"/><path d="m173.1 74.3 17.8 9.2-44.7 34-17.4-9.4 44.3-33.8z"/></svg>
|
After Width: | Height: | Size: 429 B |
@@ -0,0 +1,48 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="generator" content="CasjaysDev" />
|
||||
<meta name="robots" content="index, follow" />
|
||||
<meta name="description" content="" />
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0"
|
||||
/>
|
||||
|
||||
<meta property="og:title" content="" />
|
||||
<meta property="og:type" content="" />
|
||||
<meta property="og:url" content="" />
|
||||
<meta property="og:image" content="" />
|
||||
|
||||
<meta name="theme-color" content="#fafafa" />
|
||||
<link rel="manifest" href="./site.webmanifest" />
|
||||
|
||||
<link rel="icon" sizes="any" href="./images/favicon.ico" />
|
||||
<link rel="icon" type="image/svg+xml" href="./images/icon.svg" />
|
||||
<link rel="apple-touch-icon" href="./images/icon.png" />
|
||||
|
||||
<link rel="stylesheet" href="./css/index.css" />
|
||||
|
||||
<script src="./js/errorpages/isup.js" defer></script>
|
||||
<script src="./js/errorpages/homepage.js" defer></script>
|
||||
<script src="./js/errorpages/loaddomain.js" defer></script>
|
||||
<script src="./js/jquery/default.js"></script>
|
||||
<script src="./js/passprotect.min.js" defer></script>
|
||||
<script src="./js/bootstrap.min.js" defer></script>
|
||||
<script src="./js/app.js" defer></script>
|
||||
|
||||
<title>Welcome</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container text-center">
|
||||
<h1 class="m-5">Congratulations</h1>
|
||||
<h2>
|
||||
Your caddy container has been setup.<br /><br /><br /><br /><br />
|
||||
</h2>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -0,0 +1,46 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="generator" content="CasjaysDev" />
|
||||
<meta name="robots" content="index, follow" />
|
||||
<meta name="description" content="" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
|
||||
|
||||
<meta property="og:title" content="" />
|
||||
<meta property="og:type" content="" />
|
||||
<meta property="og:url" content="" />
|
||||
<meta property="og:image" content="" />
|
||||
|
||||
<meta name="theme-color" content="#fafafa" />
|
||||
<link rel="manifest" href="./site.webmanifest" />
|
||||
|
||||
<link rel="icon" sizes="any" href="./images/favicon.ico" />
|
||||
<link rel="icon" type="image/svg+xml" href="./images/icon.svg" />
|
||||
<link rel="apple-touch-icon" href="./images/icon.png" />
|
||||
|
||||
<link rel="stylesheet" href="./css/index.css" />
|
||||
|
||||
<script src="./js/errorpages/isup.js" defer></script>
|
||||
<script src="./js/errorpages/homepage.js" defer></script>
|
||||
<script src="./js/errorpages/loaddomain.js" defer></script>
|
||||
<script src="./js/jquery/default.js"></script>
|
||||
<script src="./js/passprotect.min.js" defer></script>
|
||||
<script src="./js/bootstrap.min.js" defer></script>
|
||||
<script src="./js/app.js" defer></script>
|
||||
|
||||
<title>Welcome</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container text-center">
|
||||
<h1 class="m-5">Congratulations</h1>
|
||||
<php phpinfo(); ?>
|
||||
<br /><br /><br /><br /><br />
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
4075
rootfs/usr/local/share/template-files/data/htdocs/www/js/bootstrap.min.js
vendored
Normal file
4075
rootfs/usr/local/share/template-files/data/htdocs/www/js/bootstrap.min.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,6 @@
|
||||
function homepage() {
|
||||
let proto = location.protocol;
|
||||
let port = location.port;
|
||||
let currentSite = window.location.hostname;
|
||||
window.location = proto + '//' + currentSite + ':' + port;
|
||||
}
|
@@ -0,0 +1,7 @@
|
||||
function isupme() {
|
||||
let proto = location.protocol;
|
||||
let port = location.port;
|
||||
let currentSite = window.location.hostname;
|
||||
fullurllocation = proto + '//' + currentSite + ':' + port;
|
||||
window.location = 'http://isup.me/' + fullurllocation;
|
||||
}
|
@@ -0,0 +1,7 @@
|
||||
function loadDomain() {
|
||||
let proto = location.protocol;
|
||||
let port = location.port;
|
||||
let url = location.hostname;
|
||||
var display = document.getElementById('display-domain');
|
||||
display.innerHTML = proto + '//' + url + ':' + port;
|
||||
}
|
@@ -0,0 +1,20 @@
|
||||
var metas = document.getElementsByTagName('meta');
|
||||
var i;
|
||||
if (navigator.userAgent.match(/iPhone/i)) {
|
||||
for (i = 0; i < metas.length; i++) {
|
||||
if (metas[i].name == 'viewport') {
|
||||
metas[i].content =
|
||||
'width=device-width, minimum-scale=1.0, maximum-scale=1.0';
|
||||
}
|
||||
}
|
||||
document.addEventListener('gesturestart', gestureStart, false);
|
||||
}
|
||||
|
||||
function gestureStart() {
|
||||
for (i = 0; i < metas.length; i++) {
|
||||
if (metas[i].name == 'viewport') {
|
||||
metas[i].content =
|
||||
'width=device-width, minimum-scale=0.25, maximum-scale=1.6';
|
||||
}
|
||||
}
|
||||
}
|
5540
rootfs/usr/local/share/template-files/data/htdocs/www/js/jquery/default.js
vendored
Normal file
5540
rootfs/usr/local/share/template-files/data/htdocs/www/js/jquery/default.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2294
rootfs/usr/local/share/template-files/data/htdocs/www/js/passprotect.min.js
vendored
Normal file
2294
rootfs/usr/local/share/template-files/data/htdocs/www/js/passprotect.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
ok
|
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"status": "ok"
|
||||
}
|
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"short_name": "",
|
||||
"name": "",
|
||||
"icons": [
|
||||
{
|
||||
"src": "./images/icon.png",
|
||||
"type": "image/png",
|
||||
"sizes": "192x192"
|
||||
}
|
||||
],
|
||||
"start_url": "/",
|
||||
"background_color": "#000000",
|
||||
"theme_color": "#ffffff"
|
||||
}
|
Reference in New Issue
Block a user