22d9f5b21d
Novas skills instaladas: - openclaw-agent-browser v1.0.0 CLI Chromium — navegação, login, screenshots, state - skill-security-audit v1.0.0 SAST scanning, prompt injection, secrets audit - sql-toolkit v1.0.0 PostgreSQL/MySQL/SQLite — schema, query, otimização - file v1.0.0 Organização de arquivos por contexto - file-summary v1.0.0 Extração e resumo de PDFs, Word, Excel Workspace expandido: - TOOLS.md: +Browser automation, Security audit, SQL, File management - AGENTS.md: +Linux Analyst section (comandos, logs, rede, scripts) + Full-stack strategy - MEMORY.md: 16 skills indexadas, stack map, comandos Linux ref - SESSION-STATE.md: atualizado com contexto completo - lock.json: sincronizado com 16 skills instaladas
84 lines
1.9 KiB
Markdown
84 lines
1.9 KiB
Markdown
# xCloud Native Laravel Deployment
|
|
|
|
## Repository Setup (Required)
|
|
|
|
File structure xCloud expects:
|
|
```
|
|
your-repo/
|
|
├── app/
|
|
├── public/ ← web root
|
|
├── storage/ ← must be writable
|
|
├── bootstrap/
|
|
├── config/
|
|
├── routes/
|
|
├── .env.example ← commit this
|
|
├── composer.json
|
|
├── artisan
|
|
└── ...
|
|
```
|
|
|
|
Critical: Never commit `.env`. Set all variables in xCloud UI.
|
|
|
|
.env.example (minimum required):
|
|
```env
|
|
APP_NAME=MyApp
|
|
APP_ENV=production
|
|
APP_KEY=
|
|
APP_DEBUG=false
|
|
APP_URL=https://yourdomain.com
|
|
|
|
DB_CONNECTION=mysql
|
|
DB_HOST=
|
|
DB_PORT=3306
|
|
DB_DATABASE=
|
|
DB_USERNAME=
|
|
DB_PASSWORD=
|
|
|
|
CACHE_DRIVER=file
|
|
QUEUE_CONNECTION=sync
|
|
SESSION_DRIVER=file
|
|
```
|
|
|
|
## xCloud UI Steps
|
|
|
|
1. Server → New Site → Laravel tab
|
|
2. Connect Git repo (GitHub/GitLab/Bitbucket)
|
|
3. Set branch (usually `main` or `master`)
|
|
4. PHP version: select 8.2 or 8.3
|
|
5. Add environment variables (from your .env.example)
|
|
- Generate APP_KEY locally: `php artisan key:generate --show`
|
|
6. Deploy hooks — add these commands in order:
|
|
```bash
|
|
composer install --no-dev --optimize-autoloader
|
|
php artisan config:cache
|
|
php artisan route:cache
|
|
php artisan view:cache
|
|
php artisan migrate --force
|
|
php artisan storage:link
|
|
```
|
|
7. Click Deploy
|
|
|
|
## Queue Workers (if using)
|
|
|
|
In xCloud site settings → Supervisor → Add worker:
|
|
```
|
|
php artisan queue:work --sleep=3 --tries=3 --max-time=3600
|
|
```
|
|
|
|
## Scheduler (if using)
|
|
|
|
In xCloud site settings → Cron Jobs → Add:
|
|
```
|
|
* * * * * php artisan schedule:run >> /dev/null 2>&1
|
|
```
|
|
|
|
## Common Issues
|
|
|
|
| Issue | Fix |
|
|
|---|---|
|
|
| 500 error after deploy | Check APP_KEY is set |
|
|
| Assets not loading | Run `npm run build` locally, commit public/build/ |
|
|
| Queue jobs not processing | Add supervisor worker |
|
|
| Storage files missing | Ensure storage:link is in deploy hooks |
|
|
| Migration errors | Check DB credentials, ensure --force flag |
|