mirror of
https://github.com/ClusterCockpit/cc-docker.git
synced 2024-12-26 20:09:06 +01:00
Merge branch 'main' of github.com:ClusterCockpit/cc-docker
This commit is contained in:
commit
4436f76a63
1
.env
1
.env
@ -9,6 +9,7 @@ APP_ENVIRONMENT=prod
|
||||
########################################################################
|
||||
# PHP
|
||||
########################################################################
|
||||
PHP_XDEBUG_INIT=false
|
||||
PHP_XDEBUG_MODE=debug,develop
|
||||
PHP_XDEBUG_CLIENT_PORT=9003
|
||||
#> LINUX: 'docker0' interface IP of host
|
||||
|
@ -27,6 +27,7 @@ services:
|
||||
build:
|
||||
context: ./php-fpm
|
||||
args:
|
||||
PHP_XDEBUG_INIT: ${PHP_XDEBUG_INIT}
|
||||
PHP_XDEBUG_MODE: ${PHP_XDEBUG_MODE}
|
||||
PHP_XDEBUG_CLIENT_PORT: ${PHP_XDEBUG_CLIENT_PORT}
|
||||
PHP_XDEBUG_CLIENT_HOST: ${PHP_XDEBUG_CLIENT_HOST}
|
||||
|
@ -8,27 +8,29 @@ RUN apk add --no-cache $PHPIZE_DEPS \
|
||||
libldap \
|
||||
openldap-dev
|
||||
|
||||
RUN pecl install xdebug-3.0.4 \
|
||||
&& docker-php-ext-enable xdebug
|
||||
RUN docker-php-ext-install ldap \
|
||||
mysqli \
|
||||
pdo_mysql \
|
||||
opcache
|
||||
|
||||
RUN docker-php-ext-install ldap mysqli pdo_mysql
|
||||
|
||||
# Enable php8-xdebug if $PHP_XDEBUG_MODE is not empty
|
||||
# Enable php8-xdebug if $PHP_XDEBUG_INIT is true
|
||||
ARG PHP_XDEBUG_INIT=false
|
||||
ARG PHP_XDEBUG_MODE=off
|
||||
ARG PHP_XDEBUG_CLIENT_PORT=5902
|
||||
ARG PHP_XDEBUG_CLIENT_HOST=host.docker.internal
|
||||
COPY xdebug.ini /etc/php8/conf.d/xdebug.ini.template
|
||||
RUN if [[ "$PHP_XDEBUG_MODE" != "" ]]; then \
|
||||
COPY error_reporting.ini /usr/local/etc/php/conf.d/error_reporting.ini
|
||||
RUN if [[ "$PHP_XDEBUG_INIT" == "true" ]]; then \
|
||||
pecl install xdebug-3.0.4; \
|
||||
docker-php-ext-enable xdebug; \
|
||||
export PHP_XDEBUG_MODE=$PHP_XDEBUG_MODE; \
|
||||
export PHP_XDEBUG_CLIENT_PORT=$PHP_XDEBUG_CLIENT_PORT; \
|
||||
export PHP_XDEBUG_CLIENT_HOST=$PHP_XDEBUG_CLIENT_HOST; \
|
||||
envsubst < /etc/php8/conf.d/xdebug.ini.template > /etc/php8/conf.d/xdebug.ini; \
|
||||
cp /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini.back; \
|
||||
cp /etc/php8/conf.d/xdebug.ini /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini; \
|
||||
rm -f /etc/php8/conf.d/xdebug.ini.template; \
|
||||
fi
|
||||
RUN rm -f /etc/php8/conf.d/xdebug.ini.template
|
||||
|
||||
RUN cp /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini.back
|
||||
RUN cp /etc/php8/conf.d/xdebug.ini /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
|
||||
COPY error_reporting.ini /usr/local/etc/php/conf.d/error_reporting.ini
|
||||
|
||||
RUN curl -sS https://getcomposer.org/installer | tee composer-setup.php \
|
||||
&& php composer-setup.php && rm composer-setup.php* \
|
||||
|
Loading…
Reference in New Issue
Block a user