mirror of
https://github.com/casjaysdevdocker/php
synced 2025-09-18 03:57:51 -04:00
🗃️ Committing everything that changed 🗃️
Dockerfile Dockerfile.7 Dockerfile.8 rootfs/root/docker/setup/02-packages.sh rootfs/root/docker/setup/03-files.sh rootfs/root/docker/setup/05-custom.sh rootfs/usr/local/bin/entrypoint.sh rootfs/usr/local/etc/docker/functions/entrypoint.sh
This commit is contained in:
@@ -24,9 +24,10 @@ set -o pipefail
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Set env variables
|
||||
exitCode=0
|
||||
|
||||
[ ! -f "/usr/local/etc/php-fpm.conf.default" ] || rm -Rf "/usr/local/etc/php-fpm.conf.default"
|
||||
[ ! -f "/usr/local/etc/php-fpm.d/www.conf.default" ] || rm -Rf "/usr/local/etc/php-fpm.d/www.conf.default"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Predifined actions
|
||||
# Predefined actions
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Main script
|
||||
|
@@ -56,7 +56,7 @@ if [ -d "/tmp/etc" ]; then
|
||||
echo "Installing $config to /etc/$name"
|
||||
if [ -d "$config" ]; then
|
||||
mkdir -p "/etc/$name"
|
||||
copy "$config/." "/etc/$name/"
|
||||
copy "$config/." "/usr/local/etc/$name/"
|
||||
mkdir -p "/usr/local/share/template-files/config/$name"
|
||||
copy "$config/." "/usr/local/share/template-files/config/$name/"
|
||||
else
|
||||
|
@@ -38,7 +38,7 @@ if [ -n "$EXT_INSTALLED" ]; then
|
||||
chmod +x "$BIN_DIR/install-php-extensions"
|
||||
for ext in $EXT_LIST $EXT_ADDITIONAL; do
|
||||
if ! echo "$ext" | grep -q "$EXT_INSTALLED"; then
|
||||
install-php-extensions $ext
|
||||
apk add --no-cache php-$ext || install-php-extensions $ext
|
||||
fi
|
||||
done
|
||||
else
|
||||
|
@@ -12,8 +12,8 @@
|
||||
# @@Description : Entrypoint file for php
|
||||
# @@Changelog : New script
|
||||
# @@TODO : Better documentation
|
||||
# @@Other :
|
||||
# @@Resource :
|
||||
# @@Other :
|
||||
# @@Resource :
|
||||
# @@Terminal App : no
|
||||
# @@sudo/root : no
|
||||
# @@Template : other/docker-entrypoint
|
||||
@@ -24,7 +24,7 @@
|
||||
[ -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
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
PATH="/usr/local/etc/docker/bin:/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin"
|
||||
export PATH="/usr/local/etc/docker/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Set bash options
|
||||
SCRIPT_FILE="$0"
|
||||
|
@@ -1058,7 +1058,9 @@ __initialize_ssl_certs() {
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
__start_php_dev_server() {
|
||||
local web_root="${1:-$WWW_ROOT_DIR}"
|
||||
if [ -n "$PHP_DEV_SERVER_PORT" ] && [ "$2" = "yes" ]; then
|
||||
local start_server="${2:-$PHP_DEV_SERVER_START}"
|
||||
[ "$CONTAINER_NAME" = "php" ] && start_server="yes"
|
||||
if [ -n "$PHP_DEV_SERVER_PORT" ] && [ "$start_server" = "yes" ]; then
|
||||
if ! echo "$web_root" | grep -q "^/usr/share/httpd"; then
|
||||
find "$web_root" -type f -not -path '.git*' -iname '*.php' -exec sed -i 's|[<].*SERVER_ADDR.*[>]|'${CONTAINER_IP4_ADDRESS:-127.0.0.1}'|g' {} \; 2>/dev/null
|
||||
php -S 0.0.0.0:$PHP_DEV_SERVER_PORT -t "$web_root"
|
||||
@@ -1153,6 +1155,7 @@ export LANG="${LANG:-C.UTF-8}"
|
||||
export LC_ALL="${LANG:-C.UTF-8}"
|
||||
export TZ="${TZ:-${TIMEZONE:-America/New_York}}"
|
||||
export HOSTNAME="${FULL_DOMAIN_NAME:-${SERVER_HOSTNAME:-$HOSTNAME}}"
|
||||
export PATH="/usr/local/etc/docker/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Default directories
|
||||
export SSL_DIR="${SSL_DIR:-/config/ssl}"
|
||||
|
Reference in New Issue
Block a user