You've already forked Epicnabbo-Catalogus-Updated-Daily
🆙 Update and chang thins to work best and add readme and install script 🆙
This commit is contained in:
+18
-6
@@ -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
|
## 🚧 Requirements
|
||||||
|
|
||||||
| Requirement | Version |
|
| Requirement | Version |
|
||||||
@@ -95,15 +107,15 @@ copy .env.example .env
|
|||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
composer install
|
composer install
|
||||||
npm install
|
yarn install
|
||||||
|
|
||||||
# Set up database and generate key
|
# Set up database and generate key
|
||||||
php artisan migrate --seed
|
php artisan migrate --seed
|
||||||
php artisan key:generate
|
php artisan key:generate
|
||||||
|
|
||||||
# Build assets
|
# Build assets
|
||||||
npm run build:atom
|
yarn run build:atom
|
||||||
# For development: npm run dev:atom
|
# For development: yarn run dev:atom
|
||||||
```
|
```
|
||||||
|
|
||||||
#### IIS Configuration
|
#### IIS Configuration
|
||||||
@@ -151,15 +163,15 @@ cp .env.example .env
|
|||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
composer install
|
composer install
|
||||||
npm install
|
yarn install
|
||||||
|
|
||||||
# Set up database and generate key
|
# Set up database and generate key
|
||||||
php artisan migrate --seed
|
php artisan migrate --seed
|
||||||
php artisan key:generate
|
php artisan key:generate
|
||||||
|
|
||||||
# Build assets
|
# Build assets
|
||||||
npm run build:atom
|
yarn run build:atom
|
||||||
# For development: npm run dev:atom
|
# For development: yarn run dev:atom
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Set Permissions
|
#### Set Permissions
|
||||||
|
|||||||
@@ -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 <<EOF
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name ${SERVER_NAME};
|
||||||
|
root ${ROOT_DIR}/public;
|
||||||
|
index index.php index.html;
|
||||||
|
|
||||||
|
add_header X-Frame-Options "SAMEORIGIN";
|
||||||
|
add_header X-Content-Type-Options "nosniff";
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files \$uri \$uri/ /index.php?\$query_string;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ \.php$ {
|
||||||
|
include snippets/fastcgi-php.conf;
|
||||||
|
fastcgi_pass unix:/run/php/php${PHP_VERSION}-fpm.sock;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ /\.(?!well-known).* {
|
||||||
|
deny all;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
echo "Enabling Nginx site"
|
||||||
|
sudo ln -sf "${NGINX_CONF}" /etc/nginx/sites-enabled/atomcms.conf
|
||||||
|
sudo nginx -t
|
||||||
|
sudo systemctl reload nginx
|
||||||
|
sudo systemctl enable --now "php${PHP_VERSION}-fpm"
|
||||||
|
|
||||||
|
echo "Setup complete. If using a domain, update DNS. Visit http://${SERVER_NAME}/"
|
||||||
|
|
||||||
Reference in New Issue
Block a user