1
0
Fork 0
mirror of https://codeberg.org/icewind/haze.git synced 2026-06-03 09:04:12 +02:00

add oracle support

This commit is contained in:
Robin Appelman 2023-05-04 16:43:57 +02:00
commit a1c8e3c338
9 changed files with 92 additions and 14 deletions

View file

@ -4,7 +4,7 @@ set -e
export DOCKER_BUILDKIT=1
versions=("7.3" "7.4" "8.0" "8.1")
versions=("8.0" "8.1" "8.2")
for version in "${versions[@]}"; do
echo "building haze-php-$version"

View file

@ -2,8 +2,8 @@
$AUTOCONFIG = [
'dbname' => 'xe',
'dbhost' => 'oci',
'dbhost' => 'oracle',
'dbuser' => 'system',
'dbpass' => 'oracle',
'dbpass' => 'haze',
'dbtype' => 'oci'
];

View file

@ -12,7 +12,7 @@ cd $WEBROOT
if [ "$SQL" = "oci" ]; then
# oracle is a special snowflake
occ maintenance:install --admin-user=$USER --admin-pass=$PASSWORD --database=$SQL --database-name=xe --database-host=$SQL --database-user=system --database-pass=oracle
occ maintenance:install --admin-user=$USER --admin-pass=$PASSWORD --database=$SQL --database-name=xe --database-host=$SQL --database-user=system --database-pass=haze
elif [ "$SQL" = "mariadb" ]; then
occ maintenance:install --admin-user=$USER --admin-pass=$PASSWORD --database=mysql --database-name=haze --database-host=$SQL --database-user=haze --database-pass=haze
else

View file

@ -79,6 +79,11 @@ RUN echo "extension=imagick.so" > $PHP_INI_DIR/conf.d/imagick.ini \
&& echo "memory_limit = 512M" > $PHP_INI_DIR/conf.d/memory_limit.ini \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer
ADD install-oci.sh /
RUN /install-oci.sh \
&& echo "extension=oci8.so" > $PHP_INI_DIR/conf.d/oci8.ini
ADD apcu.ini opcache.ini redis.ini $PHP_INI_DIR/conf.d/
ADD nginx.conf nginx-app.conf /etc/nginx/

25
images/php/install-oci.sh Executable file
View file

@ -0,0 +1,25 @@
#!/bin/sh
PHP=$(echo "$PHP_VERSION" | cut -c -3)
echo "php $PHP"
case $PHP in
"7.4") OCI_VERSION="-2.2.0" ;;
"8.0") OCI_VERSION="-3.0.1" ;;
"8.1") OCI_VERSION="-3.2.1" ;;
*) status=$status ;;
esac
echo "using oci8$OCI_VERSION"
mkdir /opt/oracle
cd /opt/oracle
wget https://download.oracle.com/otn_software/linux/instantclient/2110000/instantclient-basiclite-linux.x64-21.10.0.0.0dbru.zip
wget https://download.oracle.com/otn_software/linux/instantclient/2110000/instantclient-sdk-linux.x64-21.10.0.0.0dbru.zip
unzip instantclient-basiclite-linux.x64-21.10.0.0.0dbru.zip
unzip instantclient-sdk-linux.x64-21.10.0.0.0dbru.zip
rm instantclient*.zip
echo /opt/oracle/instantclient_21_10 > /etc/ld.so.conf.d/oracle-instantclient.conf
ldconfig
pecl install -D 'with-oci8="instantclient,/opt/oracle/instantclient_21_10"' oci8$OCI_VERSION

View file

@ -2,7 +2,7 @@
set -e
versions=("7.3" "7.4" "8.0" "8.1" "7.3-dbg" "7.4-dbg" "8.0-dbg" "8.1-dbg")
versions=("8.0" "8.1" "8.2" "8.0-dbg" "8.1-dbg" "8.2-dbg")
for version in "${versions[@]}"; do
docker push "icewind1991/haze-php:$version"