Skip to content

Commit 4291664

Browse files
committed
fix(stacks): php and nginx bug
1 parent 7d4df6f commit 4291664

2 files changed

Lines changed: 16 additions & 3 deletions

File tree

stacks/nginx/make.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ cd nginx-${STACK_VERSION}
77
--prefix=/opt/drycc/nginx \
88
--with-threads \
99
--with-file-aio \
10+
--with-http_realip_module \
1011
--with-http_ssl_module \
1112
--with-http_v2_module \
1213
--with-pcre-jit

stacks/php/build.sh

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,27 @@
55

66
# Implement build function
77
function build() {
8+
echo "libpcre3-dev" > ${META_DIR}/dependencies
89
mkdir -p /opt/drycc/php/profile.d
910
cat << EOF > /opt/drycc/php/profile.d/php.sh
10-
export PATH=/opt/drycc/php/bin:/opt/drycc/php/sbin:$PATH
11-
export PHP_PEAR_PHP_BIN=/opt/drycc/php/bin/php
12-
export PHP_PEAR_INSTALL_DIR=/opt/drycc/php/lib/php
11+
export PATH="/opt/drycc/php/bin:/opt/drycc/php/sbin:\$PATH"
12+
export PHP_PEAR_PHP_BIN="/opt/drycc/php/bin/php"
13+
export PHP_PEAR_INSTALL_DIR="/opt/drycc/php/lib/php"
14+
export C_INCLUDE_PATH="/opt/drycc/php/include:\$C_INCLUDE_PATH"
15+
export CPLUS_INCLUDE_PATH="/opt/drycc/php/include:\$CPLUS_INCLUDE_PATH"
1316
EOF
1417
. /opt/drycc/php/profile.d/php.sh
1518
./make.sh
19+
pecl config-set php_dir "/opt/drycc/php"
20+
pecl config-set bin_dir "/opt/drycc/php/bin"
21+
pecl config-set ext_dir "/opt/drycc/php/ext"
22+
pecl config-set doc_dir "/opt/drycc/php/docs"
23+
php -r "copy('https://install.phpcomposer.com/installer', 'composer-setup.php');"
24+
php composer-setup.php --install-dir="/opt/drycc/php/bin/"
25+
mv /opt/drycc/php/bin/composer.phar /opt/drycc/php/bin/composer
26+
mkdir -p /opt/drycc/php/{config,ext,docs}
1627
cp -rf /opt/drycc/php/* ${DATA_DIR}
28+
rm -rf composer-setup.php
1729
}
1830

1931
# call build stack

0 commit comments

Comments
 (0)