# 🏗️ Complete Infrastructure Report for AI-Impress

> **Generated:** 2025-11-03 10:22:09
> **Host:** ai-impress-prod | **IP:** 51.89.231.46
> **Status:** 54 containers running / 55 total

---

## 📑 TABLE OF CONTENTS

1. [Executive Summary](#executive-summary) - Quick overview
2. [Service Inventory](#service-inventory) - What we have
3. [How to Manage](#how-to-manage) - Do it yourself
4. [Current Status](#current-status) - What's working
5. [Troubleshooting](#troubleshooting) - Fix problems

---

## 1️⃣ EXECUTIVE SUMMARY

### Quick Health Check
- 🐳 **Containers:** 54 running / 55 total
- 💾 **Backups:** 6.5G
- 💿 **Databases:** 16K
- 🌐 **Networks:** 17
- 📦 **Volumes:** 29

### What This System Does
- **Wiki & Documentation** (Outline)
- **Workflow Automation** (N8N)
- **CRM & Marketing** (Mautic)
- **Business Management** (Odoo)
- **Team Auth** (Authentik)
- **Backups & Recovery** (Restic)

---

## 2️⃣ SERVICE INVENTORY

### 🏛️ CRITICAL - CANNOT DELETE
Must stay running or everything breaks:

| Service | Container | Purpose | Port |
|---------|-----------|---------|------|
| **Traefik** | traefik | Reverse proxy, SSL | 80, 443 |
| **PostgreSQL** | postgres-main | Main database | 5432 |
| **Redis** | redis-main | Cache & queues | 6379 |
| **Vault** | vault | Secrets | 8200 |

### 💼 BUSINESS APPLICATIONS

| Service | URL | Delete? |
|---------|-----|---------|
| **Outline** | https://wiki.ai-impress.com | ⚠️ Data loss |
| **N8N** | https://n8n.ai-impress.com | ⚠️ Data loss |
| **Mautic** | https://marketing.ai-impress.com | ⚠️ Data loss |
| **Odoo** | https://odoo.ai-impress.com | ⚠️ Data loss |
| **Authentik** | https://auth.ai-impress.com | ❌ Breaks login |
| **Portainer** | https://portainer.ai-impress.com | ✅ Safe |
| **Grafana** | https://grafana.ai-impress.com | ✅ Safe |

---

## 3️⃣ HOW TO MANAGE

### ✏️ Change PostgreSQL Password

```bash
# 1. SSH to server
ssh ubuntu@51.89.231.46

# 2. Generate new password
NEW_PASS=$(openssl rand -base64 32)

# 3. Change in database
docker exec postgres-main psql -U aimpress_admin -c "ALTER USER outline_user WITH PASSWORD '$NEW_PASS';"

# 4. Save password
vault kv put aimpress/postgres/outline password=$NEW_PASS

# 5. Restart service
cd /opt/02-core/outline && docker-compose restart

# 6. Test
curl -s https://wiki.ai-impress.com
```

### 🗑️ Delete Container

```bash
# Backup first!
docker exec <container> mysqldump --all-databases > /tmp/backup.sql

# Stop and remove
docker-compose -f /opt/path stop <container>
docker rm <container>

# Update docker-compose.yml
nano /opt/path/docker-compose.yml

# Restart
docker-compose up -d
```

### 🔄 Restart Service

```bash
docker restart <container>
docker-compose -f /opt/path restart
```

### 📊 View Logs

```bash
docker logs -f --tail 50 <container>
```

---

## 4️⃣ CURRENT STATUS

### Containers
- mautic-db: Up 2 hours
- outline: Up 1 second (health: starting)
- wikijs: Up 15 hours
- documenso: Up 3 days
- supabase-kong: Up 3 days (healthy)
- supabase-vector: Up 3 days (healthy)
- vault: Up 3 days (healthy)
- supabase-imgproxy: Up 3 days (healthy)
- supabase-rest: Up 3 days
- traefik: Up 2 days
- authentik-server: Up 2 days (healthy)
- authentik-worker: Up 2 days (healthy)
- authentik-redis: Up 2 days (healthy)
- authentik-postgres: Up 2 days (healthy)
- postgres-exporter: Up 4 days
- mautic: Up 4 days
- n8n-shared: Up 4 days
- n8n-worker-4: Up 4 days
- n8n-worker-2: Up 4 days
- n8n-worker-1: Up 4 days
- n8n-worker-3: Up 4 days
- blackbox-exporter: Up 4 days
- promtail: Up 4 days
- loki: Up 4 days
- cadvisor: Up 4 days (healthy)
- grafana: Up 4 days
- node-exporter: Up 4 days
- prometheus: Up 4 days
- alertmanager: Up 4 days
- postiz: Up 4 days
- postiz-postgres: Up 4 days (healthy)
- postiz-redis: Up 4 days (healthy)
- odoo: Up 6 days
- supabase-auth: Up 6 days (healthy)
- vaultwarden: Up 2 hours (healthy)
- uptime-kuma: Up 6 days (healthy)
- mautic-odoo-sync-v2: Up 7 days (healthy)
- supabase-storage: Up 7 days (healthy)
- realtime-dev.supabase-realtime: Up 2 hours (healthy)
- supabase-pooler: Up 7 days (healthy)
- supabase-edge-functions: Up 7 days
- supabase-meta: Up 7 days (healthy)
- supabase-studio: Up 7 days (healthy)
- supabase-analytics: Up 7 days (healthy)
- supabase-db: Up 2 hours (healthy)
- mautic-sync-webhook: Up 7 days
- portainer: Up 7 days
- evolution-api: Up 7 days
- rabbitmq: Up 7 days (healthy)
- pgadmin: Up 7 days
- postgres-main: Up 2 hours (healthy)
- landing-page: Up 9 days
- sftp-server: Up 9 days
- redis-main: Up 13 hours (healthy)

### Websites
- ✅ wiki.ai-impress.com
- ✅ n8n.ai-impress.com
- ✅ marketing.ai-impress.com
- ✅ odoo.ai-impress.com

---

## 5️⃣ TROUBLESHOOTING

### Website not responding
```bash
docker ps | grep traefik  # Check Traefik
docker logs traefik       # View logs
```

### Database error
```bash
docker ps | grep postgres  # Check PostgreSQL
docker logs postgres-main  # View logs
df -h /mnt/psql-data      # Check disk
```

### Out of disk space
```bash
du -sh /opt/* /mnt/* | sort -h
find /opt/05-backups/logs -mtime +30 -delete
ls -t /mnt/backups/postgresql-*.sql.gz | tail -n +11 | xargs rm
```

---

**Generated:** Mon Nov  3 10:22:09 UTC 2025
**Location:** /opt/infrastructure-docs/reports/

