105 lines
2.1 KiB
Markdown
105 lines
2.1 KiB
Markdown
# Quick Migration Guide
|
|
|
|
## Prerequisites - SSH Setup
|
|
|
|
Add to `~/.ssh/config`:
|
|
|
|
```ssh-config
|
|
Host 124
|
|
HostName 124.local
|
|
User admin
|
|
ForwardAgent yes
|
|
```
|
|
|
|
Test: `ssh 124 "echo works"`
|
|
|
|
## TL;DR - Run from Dev Mac (einszwovier.local)
|
|
|
|
```bash
|
|
# 1. Run this script from your dev Mac
|
|
cd /Users/aron124/webapp_124
|
|
./migrate_to_production.sh
|
|
|
|
# That's it! The script handles everything.
|
|
```
|
|
|
|
## What the Script Does
|
|
|
|
1. ✅ Stops Docker services on dev Mac (locally)
|
|
2. ✅ Creates directory on production Mac via SSH
|
|
3. ✅ Copies all files using rsync (with progress bar)
|
|
4. ✅ Fixes permissions on production Mac via SSH
|
|
5. ✅ Starts all services on production Mac via SSH
|
|
6. ✅ Shows service status
|
|
|
|
## Manual Steps (if you prefer)
|
|
|
|
### On Dev Mac (einszwovier.local)
|
|
|
|
```bash
|
|
# Stop services
|
|
cd /Users/aron124/webapp_124
|
|
docker compose down
|
|
|
|
# Copy everything to production
|
|
rsync -avz --progress /Users/aron124/webapp_124/ 124:/Users/admin/webapp_124/
|
|
```
|
|
|
|
### On Production Mac (124.local)
|
|
|
|
```bash
|
|
# SSH into production
|
|
ssh 124
|
|
# Fix permissions
|
|
cd /Users/admin/webapp_124
|
|
sudo chown -R admin:staff .
|
|
chmod -R 755 matrix/ ollama/ open-webui/ bookstack/ docmost/ data/
|
|
|
|
# Start services
|
|
docker compose up -d
|
|
|
|
# Check status
|
|
docker compose ps
|
|
```
|
|
|
|
## Access Points After Migration
|
|
|
|
- **Main App**: <http://124.local> or <http://localhost> (on production Mac)
|
|
- **Matrix**: <http://124.local:8008>
|
|
- **BookStack**: <http://124.local:6875>
|
|
- **Open WebUI**: <http://124.local:8080>
|
|
- **JupyterHub**: <http://124.local:8000>
|
|
- **Forgejo**: <http://124.local:3000>
|
|
- **Element Web**: <http://124.local:8888>
|
|
|
|
## Troubleshooting
|
|
|
|
**SSH issues:**
|
|
|
|
```bash
|
|
# Test SSH connection first
|
|
ssh 124 "echo 'Connection works!'"
|
|
|
|
# If you need password-less SSH (recommended):
|
|
ssh-copy-id 124
|
|
```
|
|
|
|
**Permission issues:**
|
|
|
|
```bash
|
|
# On production Mac
|
|
cd /Users/admin/webapp_124
|
|
sudo chown -R admin:staff .
|
|
```
|
|
|
|
**Services won't start:**
|
|
|
|
```bash
|
|
# On production Mac
|
|
cd /Users/admin/webapp_124
|
|
docker compose logs [service-name]
|
|
```
|
|
|
|
## Full Documentation
|
|
|
|
See `MIGRATION.md` for complete step-by-step guide.
|