diff --git a/Updated_Cms/README.md b/Updated_Cms/README.md index cefe530de1..fdbdeb6959 100644 --- a/Updated_Cms/README.md +++ b/Updated_Cms/README.md @@ -50,6 +50,18 @@ Experience Atom CMS with our official themes: --- +## 📝 What's Changed + +- Added official support for PHP 8.5 across tooling +- Switched documentation to Yarn for frontend workflows +- Addressed Dusk build warnings with Rollup configuration +- Ignored Filament cache to prevent platform-specific path issues +- Added Linux Nginx setup script for non‑Docker deployments +- Normalized paths for cross‑platform compatibility +- Resolved remaining PHPStan issues; static analysis now passes cleanly + +--- + ## 🚧 Requirements | Requirement | Version | @@ -95,15 +107,15 @@ copy .env.example .env # Install dependencies composer install -npm install +yarn install # Set up database and generate key php artisan migrate --seed php artisan key:generate # Build assets -npm run build:atom -# For development: npm run dev:atom +yarn run build:atom +# For development: yarn run dev:atom ``` #### IIS Configuration @@ -151,15 +163,15 @@ cp .env.example .env # Install dependencies composer install -npm install +yarn install # Set up database and generate key php artisan migrate --seed php artisan key:generate # Build assets -npm run build:atom -# For development: npm run dev:atom +yarn run build:atom +# For development: yarn run dev:atom ``` #### Set Permissions diff --git a/Updated_Cms/setup_linux_nginx.sh b/Updated_Cms/setup_linux_nginx.sh new file mode 100644 index 0000000000..b604671ff3 --- /dev/null +++ b/Updated_Cms/setup_linux_nginx.sh @@ -0,0 +1,89 @@ +#!/usr/bin/env bash +set -euo pipefail + +ROOT_DIR="${1:-/var/www/atomcms/app}" +SERVER_NAME="${2:-_}" +PHP_VERSION="8.5" + +echo "Preparing system packages" +sudo apt-get update -y +sudo apt-get install -y software-properties-common curl gnupg2 ca-certificates lsb-release + +echo "Adding PHP repository" +sudo add-apt-repository -y ppa:ondrej/php +sudo apt-get update -y + +echo "Installing PHP ${PHP_VERSION} and extensions" +sudo apt-get install -y "php${PHP_VERSION}-fpm" "php${PHP_VERSION}-cli" "php${PHP_VERSION}-curl" "php${PHP_VERSION}-mbstring" "php${PHP_VERSION}-gd" "php${PHP_VERSION}-intl" "php${PHP_VERSION}-mysql" "php${PHP_VERSION}-bcmath" "php${PHP_VERSION}-zip" + +echo "Installing Nginx" +sudo apt-get install -y nginx + +echo "Installing Composer and Yarn" +sudo apt-get install -y composer nodejs npm +sudo npm install -g yarn + +echo "Ensuring application directory exists: ${ROOT_DIR}" +if [ ! -d "${ROOT_DIR}" ]; then + echo "Directory ${ROOT_DIR} does not exist. Clone the repository into this path and rerun." + exit 1 +fi + +cd "${ROOT_DIR}" + +if [ ! -f ".env" ]; then + cp .env.example .env || true +fi + +echo "Installing PHP dependencies" +composer install --no-interaction --prefer-dist --optimize-autoloader + +echo "Generating app key" +php artisan key:generate || true + +echo "Installing JS dependencies" +yarn install --silent + +echo "Building assets (Atom theme)" +yarn run build:atom + +echo "Setting permissions" +sudo chown -R www-data:www-data storage bootstrap/cache +sudo chmod -R 775 storage bootstrap/cache + +NGINX_CONF="/etc/nginx/sites-available/atomcms.conf" + +echo "Writing Nginx server block to ${NGINX_CONF}" +sudo tee "${NGINX_CONF}" >/dev/null <