Skip to content

Commit

Permalink
Merge pull request #47 from flownative/feature/add-excimer-extension
Browse files Browse the repository at this point in the history
Add Excimer extension
  • Loading branch information
kdambekalns authored Dec 17, 2024
2 parents c5b663a + a91eb4d commit 276fb9f
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ RUN export FLOWNATIVE_LOG_PATH_AND_FILENAME=/dev/stdout \
&& /build.sh build_extension phpredis \
&& /build.sh build_extension xdebug \
&& /build.sh disable_extension xdebug \
&& /build.sh build_extension mediawiki-php-excimer \
&& /build.sh disable_extension mediawiki-php-excimer \
&& /build.sh build_extension ssh2 \
&& /build.sh clean

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ similar mechanism in Kubernetes or your actual platform.
| PHP_XDEBUG_CLIENT_HOST | string | | Configures the IP address or hostname where Xdebug will attempt to connect to when initiating a debugging connection. See Xdebug manual for details |
| PHP_XDEBUG_MAX_NESTING_LEVEL | integer | 512 | Controls the protection mechanism for infinite recursion protection. See Xdebug manual for details |
| PHP_IGBINARY_ENABLE | boolean | false | Enable or disable the igbinary extension |
| PHP_EXCIMER_ENABLE | boolean | false | Enable or disable the Excimer extension |
| PHP_FPM_USER | string | 1000 | User id for running PHP (read-only) |
| PHP_FPM_GROUP | string | 1000 | Group id for running PHP (read-only) |
| PHP_FPM_PORT | string | 9000 | Port the PHP-FPM process listens to |
Expand Down
9 changes: 9 additions & 0 deletions root-files/opt/flownative/lib/php-fpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ export PHP_XDEBUG_MAX_NESTING_LEVEL="${PHP_XDEBUG_MAX_NESTING_LEVEL:-512}"
export PHP_IGBINARY_ENABLE="${PHP_IGBINARY_ENABLE:-false}"
export PHP_EXCIMER_ENABLE="${PHP_EXCIMER_ENABLE:-false}"
export PHP_FPM_USER="1000"
export PHP_FPM_GROUP="1000"
export PHP_FPM_PORT="${PHP_FPM_PORT:-9000}"
Expand Down Expand Up @@ -96,6 +98,13 @@ php_fpm_initialize() {
info "PHP-FPM: igbinary is disabled"
fi

if is_boolean_yes "${PHP_EXCIMER_ENABLE}"; then
info "PHP-FPM: Excimer is enabled"
mv "${PHP_CONF_PATH}/conf.d/php-ext-mediawiki-php-excimer.ini.inactive" "${PHP_CONF_PATH}/conf.d/php-ext-mediawiki-php-excimer.ini"
else
info "PHP-FPM: Excimer is disabled"
fi

# Create a file descriptor for the PHP-FPM log output and clean up the log lines a bit:
exec 4> >(sed -e "s/^\([0-9\/-]* [0-9:,]*\)/\1 OUTPUT PHP-FPM:/")
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#!/bin/bash
# shellcheck disable=SC2086

# ---------------------------------------------------------------------------------------
# extensions_mediawiki-php-excimer_prepare() - Prepare the system for this extension
#
# @return List of packages
#
extensions_mediawiki-php-excimer_prepare() {
echo ""
}

# ---------------------------------------------------------------------------------------
# extensions_mediawiki-php-excimer_build_packages() - List package names only needed during build time
#
# @return List of packages
#
extensions_mediawiki-php-excimer_build_packages() {
local packages="
"
echo $packages
}

# ---------------------------------------------------------------------------------------
# extensions_mediawiki-php-excimer_runtime_packages() - List package names needed during runtime
#
# @return List of packages
#
extensions_mediawiki-php-excimer_runtime_packages() {
local packages="
"
echo $packages
}

# ---------------------------------------------------------------------------------------
# extensions_mediawiki-php-excimer_url() - Returns the URL leading to the source code archive
#
# See https://github.com/wikimedia/mediawiki-php-excimer/tags
#
# @return string
#
extensions_mediawiki-php-excimer_url() {
echo "https://github.com/wikimedia/mediawiki-php-excimer/archive/refs/tags/1.2.3.tar.gz"
}

# ---------------------------------------------------------------------------------------
# extensions_mediawiki-php-excimer_configure_arguments() - Returns additional configure arguments
#
# @return string
#
extensions_mediawiki-php-excimer_configure_arguments() {
echo ""
}

0 comments on commit 276fb9f

Please sign in to comment.