diff --git a/.env.example b/.env.example deleted file mode 100755 index 2c90616..0000000 --- a/.env.example +++ /dev/null @@ -1,10 +0,0 @@ -# ───────────────────────────────────────────────── -# AtomCMS — Environment Configuration -# ───────────────────────────────────────────────── -# Choose your platform and copy the right file: -# -# Linux: cp .env.example.linux .env -# Windows: cp .env.example.windows .env -# -# Then run: php artisan key:generate -# ───────────────────────────────────────────────── diff --git a/.env.install b/.env.install new file mode 100755 index 0000000..e73c21e --- /dev/null +++ b/.env.install @@ -0,0 +1,59 @@ +╔══════════════════════════════════════════════════════════════╗ +║ AtomCMS — Environment Installation Guide ║ +╚══════════════════════════════════════════════════════════════╝ + +Follow these steps to configure your environment: + +Step 1 ─ Choose your platform +───────────────────────────── + Linux: cp .env.example.linux .env + Windows: cp .env.example.windows .env + +Step 2 ─ Generate app key +───────────────────────── + php artisan key:generate + +Step 3 ─ Edit database settings in .env +─────────────────────────────────────── + DB_DATABASE=habbo + DB_USERNAME=cms # Linux: create a dedicated DB user + DB_USERNAME=root # Windows: default MySQL user + DB_PASSWORD=your_secure_password + +Step 4 ─ Set your domain +───────────────────────── + APP_URL=https://yourhotel.nl + SESSION_DOMAIN=.yourhotel.nl + SANCTUM_STATEFUL_DOMAINS=yourhotel.nl,www.yourhotel.nl + CORS_ALLOWED_ORIGINS=https://yourhotel.nl,https://www.yourhotel.nl + +Step 5 ─ Set to production +─────────────────────────── + APP_ENV=production + APP_DEBUG=false + +Step 6 ─ (Linux only) Configure Redis +───────────────────────────────────── + sudo apt install redis-server + sudo systemctl enable --now redis-server + +Step 7 ─ Run migrations +──────────────────────── + php artisan migrate --seed + +Step 8 ─ Build frontend +─────────────────────── + yarn install && yarn build:all + +Step 9 ─ Set permissions (Linux) +──────────────────────────────── + sudo chown -R www-data:www-data storage bootstrap/cache public/build + sudo chmod -R 775 storage bootstrap/cache + +Step 10 ─ Restart PHP-FPM (Linux) +───────────────────────────────── + sudo systemctl restart php8.5-fpm + +──────────────────────────────────────────────────────────────── + Your hotel is now ready at: https://yourhotel.nl +──────────────────────────────────────────────────────────────── diff --git a/README.md b/README.md index 405bf96..b5890f9 100755 --- a/README.md +++ b/README.md @@ -149,10 +149,14 @@ Two ready-to-use environment configurations are included: | File | Platform | Cache | Database | | ---- | -------- | ----- | -------- | +| `.env.install` | — | — | Step-by-step setup guide | | `.env.example.linux` | Linux (production) | Redis | MariaDB | | `.env.example.windows` | Windows (development) | File-based | MySQL | ```bash +# Read the installation guide first +less .env.install + # Linux cp .env.example.linux .env