1
0
mirror of https://github.com/pooneyy/1Panel-Appstore.git synced 2026-04-24 06:09:36 +08:00

feat: 修改 PHP 运行环境配置

This commit is contained in:
zhengkunwang223 2024-09-25 14:28:38 +08:00 committed by CityFun
parent f71f402fbe
commit 4b728c93e0
5 changed files with 27 additions and 49 deletions

View File

@ -23,6 +23,7 @@ services:
- ./supervisor/supervisor.d/php-fpm.ini:/etc/supervisor.d/php-fpm.ini
- ./supervisor/supervisor.d:/etc/supervisor.d
- ./supervisor/log:/var/log/supervisor
- ./composer:/tmp/composer
ports:
- 127.0.0.1:${PANEL_APP_PORT_HTTP}:9000
labels:

View File

@ -87,31 +87,6 @@ install_extension_default() {
}
install_gd() {
isPhpVersionGreaterOrEqual 8 0
if [ "$?" = "1" ]; then
# "--with-xxx-dir" was removed from php 7.4,
# issue: https://github.com/docker-library/php/issues/912
options="--with-freetype --with-jpeg --with-webp"
else
options="--with-gd --with-freetype-dir=/usr/include/ --with-png-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-webp-dir=/usr/include/"
fi
apt-get install -y \
libfreetype6 \
libfreetype6-dev \
libpng-dev \
libwebp-dev \
libjpeg-dev \
&& docker-php-ext-configure gd ${options} \
&& docker-php-ext-install ${MC} gd \
&& apt-get purge -y \
libfreetype6-dev \
libpng-dev \
&& apt-get autoremove -y
}
install_msg() {
if [ $? -eq 0 ]; then
echo "------ install $1 succeeded ------"
@ -152,7 +127,7 @@ install_extension() {
echo "------ install extension: $extension ------"
if [ "$extension" = "gd" ]; then
install_gd
install_php_extensions gd
elif [ "$extension" = "memcache" ]; then
install_memcache
elif [ "$extension" = "yaf" ]; then

View File

@ -23,6 +23,7 @@ services:
- ./supervisor/supervisor.d/php-fpm.ini:/etc/supervisor.d/php-fpm.ini
- ./supervisor/supervisor.d:/etc/supervisor.d
- ./supervisor/log:/var/log/supervisor
- ./composer:/tmp/composer
ports:
- 127.0.0.1:${PANEL_APP_PORT_HTTP}:9000
labels:

View File

@ -88,28 +88,28 @@ install_extension_default() {
install_gd() {
isPhpVersionGreaterOrEqual 8 0
if [ "$?" = "1" ]; then
# "--with-xxx-dir" was removed from php 7.4,
# issue: https://github.com/docker-library/php/issues/912
options="--with-freetype --with-jpeg --with-webp"
else
options="--with-gd --with-freetype-dir=/usr/include/ --with-png-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-webp-dir=/usr/include/"
fi
apt-get install -y \
libfreetype6 \
libfreetype6-dev \
libpng-dev \
libwebp-dev \
libjpeg-dev \
&& docker-php-ext-configure gd ${options} \
&& docker-php-ext-install ${MC} gd \
&& apt-get purge -y \
libfreetype6-dev \
libpng-dev \
&& apt-get autoremove -y
}
#install_gd() {
# isPhpVersionGreaterOrEqual 8 0
# if [ "$?" = "1" ]; then
# # "--with-xxx-dir" was removed from php 7.4,
# # issue: https://github.com/docker-library/php/issues/912
# options="--with-freetype --with-jpeg --with-webp"
# else
# options="--with-gd --with-freetype-dir=/usr/include/ --with-png-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-webp-dir=/usr/include/"
# fi
# apt-get install -y \
# libfreetype6 \
# libfreetype6-dev \
# libpng-dev \
# libwebp-dev \
# libjpeg-dev \
# && docker-php-ext-configure gd ${options} \
# && docker-php-ext-install ${MC} gd \
# && apt-get purge -y \
# libfreetype6-dev \
# libpng-dev \
# && apt-get autoremove -y
#}
install_msg() {
@ -152,7 +152,7 @@ install_extension() {
echo "------ install extension: $extension ------"
if [ "$extension" = "gd" ]; then
install_gd
install_php_extensions gd
elif [ "$extension" = "memcache" ]; then
install_memcache
elif [ "$extension" = "yaf" ]; then

View File

@ -23,6 +23,7 @@ services:
- ./supervisor/supervisor.d/php-fpm.ini:/etc/supervisor.d/php-fpm.ini
- ./supervisor/supervisor.d:/etc/supervisor.d
- ./supervisor/log:/var/log/supervisor
- ./composer:/tmp/composer
ports:
- 127.0.0.1:${PANEL_APP_PORT_HTTP}:9000
labels: