diff --git a/.travis.yml b/.travis.yml index 0ff413f8..17d4525d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,6 @@ env: language: php php: - - 8.1 - 8.2 - 8.3 diff --git a/Dockerfile b/Dockerfile index d16884fc..b0711de0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ ARG BUILDPLATFORM=linux/amd64 ARG TARGETPLATFORM -ARG ALPINE_VERSION=3.17 -ARG PHP_VERSION=8.1-alpine${ALPINE_VERSION} -ARG COMPOSER_VERSION=2.3 +ARG ALPINE_VERSION=3.19 +ARG PHP_VERSION=8.2-alpine${ALPINE_VERSION} +ARG COMPOSER_VERSION=2.7 ARG SUPERVISORD_VERSION=v0.7.3 ARG UID=1000 @@ -46,28 +46,28 @@ COPY --from=supervisord --chown=${UID}:${GID} /bin /usr/local/bin/supervisord # Install PHP and PHP system dependencies RUN apk add --update --no-cache \ # PHP - php81 \ + php82 \ # Composer dependencies - php81-phar \ + php82-phar \ # PHP SQLite, MySQL/MariaDB & Postgres drivers - php81-pdo_sqlite php81-sqlite3 php81-pdo_mysql php81-pdo_pgsql php81-pgsql \ + php82-pdo_sqlite php82-sqlite3 php82-pdo_mysql php82-pdo_pgsql php82-pgsql \ # PHP extensions - php81-xml php81-gd php81-mbstring php81-tokenizer php81-fileinfo php81-bcmath php81-ctype php81-dom \ + php82-xml php82-gd php82-mbstring php82-tokenizer php82-fileinfo php82-bcmath php82-ctype php82-dom \ # Runtime dependencies - php81-session php81-openssl \ + php82-session php82-openssl \ # Nginx and PHP FPM to serve over HTTP - php81-fpm nginx + php82-fpm nginx # PHP FPM configuration # Change username and ownership in php-fpm pool config -RUN sed -i '/user = nobody/d' /etc/php81/php-fpm.d/www.conf && \ - sed -i '/group = nobody/d' /etc/php81/php-fpm.d/www.conf && \ - sed -i '/listen.owner/d' /etc/php81/php-fpm.d/www.conf && \ - sed -i '/listen.group/d' /etc/php81/php-fpm.d/www.conf +RUN sed -i '/user = nobody/d' /etc/php82/php-fpm.d/www.conf && \ + sed -i '/group = nobody/d' /etc/php82/php-fpm.d/www.conf && \ + sed -i '/listen.owner/d' /etc/php82/php-fpm.d/www.conf && \ + sed -i '/listen.group/d' /etc/php82/php-fpm.d/www.conf # Pre-create files with the correct permissions RUN mkdir /run/php && \ - chown ${UID}:${GID} /run/php /var/log/php81 && \ - chmod 700 /run/php /var/log/php81 + chown ${UID}:${GID} /run/php /var/log/php82 && \ + chmod 700 /run/php /var/log/php82 # NGINX # Clean up diff --git a/README.md b/README.md index ff785b20..a787f324 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ ### RFC compliance ## Requirements -* [![Requires PHP8](https://img.shields.io/badge/php-^8.1-red.svg?style=flat-square)](https://secure.php.net/downloads.php) +* [![Requires PHP8](https://img.shields.io/badge/php-^8.2-red.svg?style=flat-square)](https://secure.php.net/downloads.php) * See [Laravel server requirements](https://laravel.com/docs/7.x/installation#server-requirements) * Any database [supported by Laravel](https://laravel.com/docs/7.x/database) diff --git a/docker/README.md b/docker/README.md index d14b97a0..d01fc593 100644 --- a/docker/README.md +++ b/docker/README.md @@ -102,8 +102,8 @@ ### Build the image with build arguments | `UID` | 1000 | The UID of the user to run the container as | | `GID` | 1000 | The GID of the user to run the container as | | `DEBIAN_VERSION` | `buster-slim` | The Debian version to use | -| `PHP_VERSION` | `8.1-buster` | The PHP version to use to get composer dependencies | -| `COMPOSER_VERSION` | `2.3` | The version of composer to use | +| `PHP_VERSION` | `8.2-buster` | The PHP version to use to get composer dependencies | +| `COMPOSER_VERSION` | `2.7` | The version of composer to use | | `SUPERVISORD_VERSION` | `v0.7.3` | The version of supervisord to use | | `VERSION` | `unknown` | The version of the image | | `CREATED` | `an unknown date` | The date of the image build time | diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 931a83a9..bc3af00b 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -6,7 +6,7 @@ echo "Running version ${VERSION} commit ${COMMIT} built on ${CREATED}" # Show versions echo "supervisord version: $(supervisord version)" -php-fpm81 -v | head -n 1 +php-fpm82 -v | head -n 1 nginx -v # Database creation diff --git a/docker/supervisord.conf b/docker/supervisord.conf index 7140a613..538e3de9 100644 --- a/docker/supervisord.conf +++ b/docker/supervisord.conf @@ -12,7 +12,7 @@ autorestart=false startretries=0 [program:php-fpm] -command=/usr/sbin/php-fpm81 -F +command=/usr/sbin/php-fpm82 -F [program:nginx] command=/usr/sbin/nginx -g 'daemon off;' diff --git a/docs/debian-setup.md b/docs/debian-setup.md index 3ca64c7d..aadbb299 100644 --- a/docs/debian-setup.md +++ b/docs/debian-setup.md @@ -4,7 +4,7 @@ # Debian Setup ## What we will do -- We will use PHP 8.1 +- We will use PHP 8.2 - We will use version v4.0.0 of 2fauth - We will setup to use an Sqlite database - We will use Nginx and PHP-FPM to serve our site on port `8000` @@ -22,11 +22,11 @@ ## Install dependencies ```bash apt-get install -y --no-install-recommends \ - php8.1 \ - php8.1-sqlite3 php8.1-mysql \ - php-xml php8.1-gd php8.1-mbstring \ + php8.2 \ + php8.2-sqlite3 php8.2-mysql \ + php-xml php8.2-gd php8.2-mbstring \ unzip wget ca-certificates \ - php8.1-fpm nginx + php8.2-fpm nginx ``` ## Download the code @@ -71,7 +71,7 @@ ## Nginx configuration error_page 404 /index.php; location ~ \.php$ { - fastcgi_pass unix:/var/run/php/php8.1-fpm.sock; + fastcgi_pass unix:/var/run/php/php8.2-fpm.sock; fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; include fastcgi_params; } @@ -129,7 +129,7 @@ ## Install supervisord startretries=0 [program:php-fpm] - command=/usr/sbin/php-fpm8.1 -F + command=/usr/sbin/php-fpm8.2 -F [program:nginx] command=/usr/sbin/nginx -g 'daemon off;' @@ -155,14 +155,14 @@ ## Fix ownership and permissions for `www-data` ```bash mkdir -p /run/php /www/data/.composer - touch /run/nginx.pid /var/log/php8.1-fpm.log + touch /run/nginx.pid /var/log/php8.2-fpm.log chown -R www-data \ - /var/log/php8.1-fpm.log \ + /var/log/php8.2-fpm.log \ /run/nginx.pid \ /run/php \ /www/data/.composer chmod 700 /run/php /www/data/.composer - chmod 600 /var/log/php8.1-fpm.log + chmod 600 /var/log/php8.2-fpm.log ``` ## Change user