Files
Archive/QUICKSTART.md

278 lines
5.3 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 🚀 Habland Quick Start Guide
Get all services running in under 5 minutes.
## Prerequisites Check
```bash
# Check Docker is installed and running
docker --version
docker compose version
# Check available resources
docker info | grep -E 'CPUs|Total Memory'
```
**Minimum Requirements:**
- Docker Engine 20.10+
- Docker Compose v2.0+
- 8GB RAM
- 20GB disk space
## 1⃣ Initial Setup (First Time Only)
```bash
# Navigate to project
cd /Users/matt/DEV/habland
# Create environment file
cp .env.example .env
# Optional: Edit configuration
nano .env
```
## 2⃣ Create Docker Network
```bash
# Create the shared network
docker network create habbo-network
```
## 3⃣ Start Services
### Option A: Using Management Script (Recommended)
```bash
# Make script executable (first time only)
chmod +x docker-manage.sh
# Start all services
./docker-manage.sh start
# Or start specific stack
./docker-manage.sh start arcturus # Arcturus + Cool UI
./docker-manage.sh start havana # Havana stack
./docker-manage.sh start kepler # Kepler emulator
./docker-manage.sh start roseau # Roseau stack
```
### Option B: Using Docker Compose Directly
```bash
# Start all services
docker compose up -d
# Or start specific services
docker compose up -d unified-db arcturus-emulator cool-ui asset-server
```
## 4⃣ Verify Services
```bash
# Check service status
./docker-manage.sh status
# Or use docker compose
docker compose ps
```
**Expected Output:**
- ✅ All services should show "Up" status
- ✅ Database should be healthy
## 5⃣ Access Services
### Web Interfaces
- **Cool UI Client**: http://localhost:5174
- **Nitro React Client**: http://localhost:5173
- **Havana Web**: http://localhost:8084
- **Roseau Client**: http://localhost:8082
- **AtomCMS**: http://localhost
- **Admin Panel**: http://localhost:3000
- **phpMyAdmin**: http://localhost:8081
### Database
- **Host**: localhost
- **Port**: 3306
- **User**: root
- **Password**: root
## 6⃣ First-Time Configuration
### Generate AtomCMS Key
```bash
docker compose exec atomcms php artisan key:generate
```
### Check Database Initialization
```bash
# Open database shell
./docker-manage.sh db
# Check databases were created
SHOW DATABASES;
# Exit
exit
```
## 🎮 Common Operations
### View Logs
```bash
# All services
./docker-manage.sh logs
# Specific service
./docker-manage.sh logs arcturus-emulator
docker compose logs -f havana-server
```
### Stop Services
```bash
# Stop all
./docker-manage.sh stop
# Stop specific stack
./docker-manage.sh stop arcturus
```
### Restart Services
```bash
# Restart all
./docker-manage.sh restart
# Restart specific service
docker compose restart arcturus-emulator
```
## 🗄️ Database Management
### Backup Database
```bash
./docker-manage.sh backup
```
**Backup Location:** `./backups/habland_backup_TIMESTAMP.sql.gz`
### Restore Database
```bash
./docker-manage.sh restore ./backups/habland_backup_20231207_120000.sql.gz
```
## 🔧 Troubleshooting
### Services Won't Start
```bash
# Check Docker is running
docker info
# Check logs for errors
docker compose logs
# Rebuild problematic service
docker compose build --no-cache [service-name]
docker compose up -d [service-name]
```
### Port Conflicts
```bash
# Check what's using a port
lsof -i :3306
# Kill process (if safe)
kill -9 [PID]
```
### Database Connection Failed
```bash
# Wait for database to be ready
docker compose exec unified-db mysqladmin ping -proot
# Check database is accessible
docker compose exec unified-db mysql -uroot -proot -e "SHOW DATABASES;"
```
### Out of Memory
```bash
# Check resource usage
docker stats
# Increase Docker memory limit (Docker Desktop > Settings > Resources)
# Stop unnecessary services
./docker-manage.sh stop kepler
./docker-manage.sh stop roseau
```
## 📊 Service Port Reference
| Service | Port | Description |
|---------|------|-------------|
| unified-db | 3306 | MariaDB Database |
| phpmyadmin | 8081 | Database Admin |
| arcturus-emulator | 30000 | Game Server |
| havana-server | 12321 | Game Server |
| kepler-server | 12309 | Game Server |
| roseau-server | 37120 | Game Server |
| cool-ui | 5174 | Web Client |
| nitro-react | 5173 | Web Client |
| havana-web | 8084 | Web Client |
| roseau-client | 8082 | Web Client |
| atomcms | 80 | CMS Portal |
| asset-server | 8083 | Game Assets |
| admin-panel | 3000 | Admin Tools |
## 🆘 Getting Help
### Check Service Health
```bash
docker compose ps
docker stats --no-stream
```
### Full System Reset (⚠️ Deletes all data)
```bash
# Stop and remove everything
docker compose down -v
# Remove network
docker network rm habbo-network
# Start fresh
docker network create habbo-network
docker compose up -d
```
## 📚 Next Steps
- Read [DOCKER_SETUP.md](DOCKER_SETUP.md) for detailed documentation
- Configure emulator settings in respective config files
- Import database schemas (if needed)
- Customize `.env` for your environment
## ⚡ Pro Tips
1. **Use the management script** - It's easier than raw docker commands
2. **Monitor logs** - Keep an eye on service logs during first startup
3. **Wait for database** - Services may restart a few times waiting for DB
4. **Backup regularly** - Use `./docker-manage.sh backup` before changes
5. **Check resource usage** - Run `docker stats` to monitor performance
---
**Need more help?** Check [DOCKER_SETUP.md](DOCKER_SETUP.md) for comprehensive documentation.