Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
robsontenorio committed Nov 23, 2024
1 parent 47b8228 commit 8388b57
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 25 deletions.
36 changes: 18 additions & 18 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,26 @@ ENV CONTAINER_ROLE=${CONTAINER_ROLE:-APP}
WORKDIR /var/www/app

RUN apt update \
# Add PHP 8.3 repository
# Add PHP 8.4 repository
&& apt install -y software-properties-common && add-apt-repository ppa:ondrej/php \
# PHP extensions
&& apt install -y \
php8.3-bcmath \
php8.3-cli \
php8.3-curl \
php8.3-fpm \
php8.3-gd \
php8.3-intl \
php8.3-mbstring \
php8.3-mysql \
php8.3-redis \
php8.3-sockets \
php8.3-sqlite3 \
php8.3-pcov \
php8.3-pgsql \
php8.3-opcache \
php8.3-xml \
php8.3-zip \
php8.4-bcmath \
php8.4-cli \
php8.4-curl \
php8.4-fpm \
php8.4-gd \
php8.4-intl \
php8.4-mbstring \
php8.4-mysql \
php8.4-redis \
php8.4-sockets \
php8.4-sqlite3 \
php8.4-pcov \
php8.4-pgsql \
php8.4-opcache \
php8.4-xml \
php8.4-zip \
# Extra
curl \
git \
Expand Down Expand Up @@ -59,7 +59,7 @@ RUN useradd -u 1000 -m -d /home/appuser -g appuser appuser
# Config files
COPY --chown=appuser:appuser start.sh /usr/local/bin/start
COPY --chown=appuser:appuser config/etc /etc
COPY --chown=appuser:appuser config/etc/php/8.3/cli/conf.d/y-php.ini /etc/php/8.3/fpm/conf.d/y-php.ini
COPY --chown=appuser:appuser config/etc/php/8.4/cli/conf.d/y-php.ini /etc/php/8.4/fpm/conf.d/y-php.ini

# Permissions for start script
RUN chmod a+x /usr/local/bin/start
Expand Down
2 changes: 1 addition & 1 deletion config/etc/nginx/sites-available/default
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ server {

# PHP
location ~ \.php$ {
fastcgi_pass unix:/home/appuser/php8.3-fpm.sock;
fastcgi_pass unix:/home/appuser/php8.4-fpm.sock;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ user = appuser
group = appuser
listen.owner = appuser
listen.group = appuser
listen = /home/appuser/php8.3-fpm.sock
listen = /home/appuser/php8.4-fpm.sock
clear_env = no

; fpm tuning
Expand Down
2 changes: 1 addition & 1 deletion config/etc/supervisor/conf.d-temp/php-fpm.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# PHP FPM
[program:php-fpm]
command=php-fpm8.3 -F
command=php-fpm8.4 -F
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
Expand Down
8 changes: 4 additions & 4 deletions databases/sqlserver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -e
# SQLSERVER DRIVERS + TOOLS #
##################################################

apt install -y php8.3-dev unixodbc-dev
apt install -y php8.4-dev unixodbc-dev

curl https://packages.microsoft.com/keys/microsoft.asc | tee /etc/apt/trusted.gpg.d/microsoft.asc
curl https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/prod.list | tee /etc/apt/sources.list.d/mssql-release.list
Expand All @@ -14,8 +14,8 @@ ACCEPT_EULA=Y apt-get install -y msodbcsql18 mssql-tools18

pecl channel-update pecl.php.net
pecl install sqlsrv pdo_sqlsrv
printf "; priority=20\nextension=sqlsrv.so\n" > /etc/php/8.3/mods-available/sqlsrv.ini
printf "; priority=30\nextension=pdo_sqlsrv.so\n" > /etc/php/8.3/mods-available/pdo_sqlsrv.ini
printf "; priority=20\nextension=sqlsrv.so\n" > /etc/php/8.4/mods-available/sqlsrv.ini
printf "; priority=30\nextension=pdo_sqlsrv.so\n" > /etc/php/8.4/mods-available/pdo_sqlsrv.ini
phpenmod sqlsrv pdo_sqlsrv

apt purge php8.3-dev -y && apt-get autoremove -y
apt purge php8.4-dev -y && apt-get autoremove -y

0 comments on commit 8388b57

Please sign in to comment.