# 🏗️ Complete Infrastructure Report for AI-Impress

> **Generated:** 2025-11-03 10:18:54
> **Host:** ai-impress-prod | **IP:** 51.89.231.46
> **Status:** 54 containers running

---

## 📑 TABLE OF CONTENTS

1. [Executive Summary](#executive-summary) - Quick overview
2. [Service Inventory](#service-inventory) - What we have and why
3. [Architecture](#architecture) - How it all connects
4. [Storage & Locations](#storage--locations) - Where everything is
5. [Access & Credentials](#access--credentials) - Logins and passwords
6. [How to Manage](#how-to-manage) - Step-by-step instructions
7. [Current Status](#current-status) - What's working now
8. [Troubleshooting](#troubleshooting) - Common problems and fixes

---

## 1️⃣ EXECUTIVE SUMMARY

### Quick Health Check
- 🐳 **Docker Containers:** 54 running / 55 total
- 💾 **Storage:** 6.4G in backups, 16K in databases
- 🌐 **Networks:** 17 Docker networks
- 📦 **Volumes:** 29 volumes

### What This System Does
This is a complete business automation platform with:
- **Wiki & Documentation** (Outline)
- **Workflow Automation** (N8N)
- **CRM & Marketing** (Mautic)
- **Business Management** (Odoo)
- **Team Chat & Auth** (Authentik)
- **File Storage** (Supabase)
- **Password Manager** (Vaultwarden)
- **Backups & Recovery** (Restic to Cloudflare R2)

---

## 2️⃣ SERVICE INVENTORY

### 🏛️ Infrastructure Core (CRITICAL - Cannot Delete!)
These services MUST stay running or everything breaks:

| Service | Container | Purpose | Storage | Port |
|---------|-----------|---------|---------|------|
| **Traefik** | traefik | Reverse proxy, SSL, routing | None | 80, 443, 8080 |
| **PostgreSQL** | postgres-main | Main database (N8N, Outline, Odoo, etc) | /mnt/psql-data | 5432 |
| **Redis** | redis-main | Cache & queues | Docker volume | 6379 |
| **Vault** | vault | Secrets management | /opt/00-infrastructure/vault | 8200 |

**IF ANY OF THESE GO DOWN - EVERYTHING STOPS!**

### 🌐 Network Services (IMPORTANT - Handle with Care)

| Service | Container | Purpose | Users | URL |
|---------|-----------|---------|-------|-----|
| **Authentik** | authentik-* | Single sign-on, user management | N/A (SSO) | https://auth.ai-impress.com |
| **RabbitMQ** | rabbitmq | Message broker | guest / password | https://rabbitmq.ai-impress.com |
| **PgAdmin** | pgadmin | Database management UI | admin@admin.com | https://pgadmin.ai-impress.com |
| **Portainer** | portainer | Docker management UI | admin | https://portainer.ai-impress.com |

### 💼 Business Applications (Can be removed individually)

#### Documentation & Knowledge
| Service | Container | Purpose | Users | URL | Storage |
|---------|-----------|---------|-------|-----|---------|
| **Outline** | outline | Wiki, documentation | Use Authentik SSO | https://wiki.ai-impress.com | PostgreSQL |
| **Wiki.js** | wikijs | Alternative wiki | (disabled) | https://info.ai-impress.com | PostgreSQL |
| **Documenso** | documenso | Document signing | signup | https://sign.ai-impress.com | PostgreSQL |

#### Automation & Workflows
| Service | Container | Purpose | Users | URL | Storage |
|---------|-----------|---------|-------|-----|---------|
| **N8N** | n8n-shared, n8n-worker-* | Workflow automation | Use Authentik SSO | https://n8n.ai-impress.com | PostgreSQL + Volumes |
| **Mautic** | mautic, mautic-db | Marketing automation | admin | https://marketing.ai-impress.com | MariaDB |
| **Evolution API** | evolution-api | WhatsApp integration | API key based | https://wpp.ai-impress.com | PostgreSQL |

#### Business Management
| Service | Container | Purpose | Users | URL | Storage |
|---------|-----------|---------|-------|-----|---------|
| **Odoo** | odoo | ERP system | admin | https://odoo.ai-impress.com | PostgreSQL |
| **Postiz** | postiz-* | Social media manager | Login required | https://social.ai-impress.com | PostgreSQL |

#### Security & Access
| Service | Container | Purpose | Users | URL | Storage |
|---------|-----------|---------|-------|-----|---------|
| **Vaultwarden** | vaultwarden | Password manager | Personal accounts | https://vault.ai-impress.com | PostgreSQL |
| **Supabase** | supabase-* | Backend as a service | API key | https://supabase.ai-impress.com | PostgreSQL |

#### Monitoring
| Service | Container | Purpose | Users | URL | Storage |
|---------|-----------|---------|-------|-----|---------|
| **Grafana** | grafana | Metrics dashboards | admin | https://grafana.ai-impress.com | Volumes |
| **Prometheus** | prometheus | Metrics collection | N/A | Internal only | Volumes |
| **Uptime Kuma** | uptime-kuma | Uptime monitoring | admin | https://status.ai-impress.com | Volumes |

---

## 3️⃣ ARCHITECTURE

### 🔗 How Services Connect



### 🌐 Docker Networks Explained

**traefik-public** (Public services)
- Containers exposed via Traefik
- Can reach HTTPS endpoints
- Examples: outline, n8n, mautic, odoo

**database-internal** (Database access)
- Services that need database
- Cannot reach public internet directly
- Examples: n8n, outline, odoo, vaultwarden

**authentik_authentik-internal** (SSO only)
- Only Authentik services
- Isolated for security

**n8n-shared** (Workflow cluster)
- Main N8N + worker nodes
- Share queue and database

---

## 4️⃣ STORAGE & LOCATIONS

### 📁 Folder Structure



### 💾 Volumes & Storage Mapping

| Volume Name | Location | Size | Used By | Backup |
|-------------|----------|------|---------|--------|
| postgres_data | /var/lib/docker/volumes/.../data | 50GB | PostgreSQL | ✅ Daily |
| redis_data | /var/lib/docker/volumes/.../data | 2GB | Redis | ❌ No backup |
| n8n-data | /var/lib/docker/volumes/.../data | 1GB | N8N | ✅ Restic |
| mautic_db | /mnt/psql-data/mautic-db | 30GB | MariaDB | ✅ Daily |
| outline_data | /var/lib/docker/volumes/.../data | 500MB | Outline | ✅ Restic |

**BACKUP STRATEGY:**
- PostgreSQL: Daily SQL dump + Restic
- MariaDB: Daily SQL dump + Restic
- Vault: Daily tar backup + Restic
- Configs: Version controlled + Restic
- Restic: Upload to Cloudflare R2 (offsite)

---

## 5️⃣ ACCESS & CREDENTIALS

### 🔐 Where Passwords Are Stored

**Primary:** Vault at 
**Secondary:** Bitwarden (synced from Vault)

### 🌐 Web Services Access

| Service | URL | Username | Password Location | Notes |
|---------|-----|----------|-------------------|-------|
| Outline | https://wiki.ai-impress.com | Use Authentik SSO | N/A | Create account via SSO |
| N8N | https://n8n.ai-impress.com | Use Authentik SSO | N/A | Create account via SSO |
| Mautic | https://marketing.ai-impress.com | admin |  | Separate DB |
| Odoo | https://odoo.ai-impress.com | admin |  | ERP system |
| Authentik | https://auth.ai-impress.com | N/A (SSO) | N/A | Admin:  |
| Vaultwarden | https://vault.ai-impress.com | Personal | Personal account | Password manager |
| Portainer | https://portainer.ai-impress.com | admin |  | Docker management |
| Grafana | https://grafana.ai-impress.com | admin |  | Monitoring |
| PgAdmin | https://pgadmin.ai-impress.com | admin@admin.com |  | Database UI |

### 🗄️ Database Access



---

## 6️⃣ HOW TO MANAGE

### ✏️ Change Password Example

#### For PostgreSQL database user (outline):

New password: QmeKWqNRnxwl3DMDbomO0FuejpHEDQwSbaY126dYF5o=
ALTER ROLE
{"ok":false,"error":"internal_error","status":500,"message":"Internal error"}

### 🗑️ Delete Unused Service Example

#### Remove a container you don't need:

a2f2949961ad   documenso-custom:latest                  "docker-entrypoint.s…"    3 days ago     Up 3 days                                                                                                                        documenso
[?2004h)0[1;24r[m(B[4l[?7h[?25l[H[J[22;35H[0;7m(B[ New File ][m(B[?25h[24;1H
[?2004la2f2949961ad   documenso-custom:latest                  "docker-entrypoint.s…"    3 days ago     Up 3 days                                                                                                                        documenso

### 🔄 Restart Services



### 📊 Check Service Logs



---

## 7️⃣ CURRENT STATUS

### 🟢 Healthy Services
- **mautic-db:** Up 2 hours
- **outline:** Up 2 hours (healthy)
- **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)

### 🔴 Problem Services


### 📊 Resource Usage

**CPU:** 0.58%
**Memory:** 12Gi/57Gi
**Disk:** 47G/387G (13%)

### 🌐 Website Status

- ✅ wiki.ai-impress.com - Online
- ✅ n8n.ai-impress.com - Online
- ✅ marketing.ai-impress.com - Online
- ✅ odoo.ai-impress.com - Online

---

## 8️⃣ TROUBLESHOOTING

### "Website not responding"

b6c668c7a683   traefik:latest                           "/entrypoint.sh --co…"    3 days ago     Up 2 days               0.0.0.0:80->80/tcp, [::]:80->80/tcp, 0.0.0.0:443->443/tcp, [::]:443->443/tcp, 127.0.0.1:8080->8080/tcp   traefik

### "Database connection failed"

c97df7338002   postgres:16-alpine                       "docker-entrypoint.s…"    7 days ago     Up 2 hours (healthy)    127.0.0.1:5432->5432/tcp                                                                                 postgres-main
 ?column? 
----------
        1
(1 row)

Filesystem      Size  Used Avail Use% Mounted on
/dev/sdb        295G  708M  279G   1% /mnt/psql-data

PostgreSQL Database directory appears to contain a database; Skipping initialization

    datname     | count 
----------------+-------
 aimpress_admin |     1
                |     5
 wikijs         |     1
 n8n_shared     |     5
 postgres       |     2
 odoo           |     1
 vaultwarden    |    10
(7 rows)

### "Out of disk space"

TYPE            TOTAL     ACTIVE    SIZE      RECLAIMABLE
Images          54        46        31.04GB   5.416GB (17%)
Containers      55        54        1.216GB   0B (0%)
Local Volumes   29        28        1.794GB   191.8MB (10%)
Build Cache     0         0         0B        0B
WARNING! This will remove:
  - all stopped containers
  - all networks not used by at least one container
  - all images without at least one container associated to them
  - all build cache

Are you sure you want to continue? [y/N] total 248K
drwxrwxr-x  2 ubuntu ubuntu 4.0K Oct 26 14:58 authelia
drwxrwxr-x  2 ubuntu ubuntu 4.0K Oct 26 15:34 authentik
drwxrwxr-x 22 ubuntu ubuntu 4.0K Nov  3 00:13 configs
drwxrwxr-x  4 ubuntu ubuntu 4.0K Oct 20 13:04 databases
drwxr-xr-x  3 ubuntu ubuntu 4.0K Oct 15 09:30 docker
drwxrwxr-x  2 ubuntu ubuntu 4.0K Nov  1 03:01 documenso
drwxr-xr-x 11 ubuntu ubuntu 4.0K Oct 18 03:00 espocrm
drwxrwxr-x  2 ubuntu ubuntu 4.0K Nov  3 03:00 evolution-api
drwxrwxr-x  2 ubuntu ubuntu 4.0K Nov  3 03:00 evolution-data
drwxrwxr-x  2 ubuntu ubuntu 4.0K Nov  3 03:00 grafana
drwxr-xr-x  2 ubuntu ubuntu 4.0K Oct 22 03:00 librechat
drwxrwxr-x  2 ubuntu ubuntu 4.0K Nov  1 03:01 loki
drwxr-xr-x  2 ubuntu ubuntu  16K Oct 13 09:39 lost+found
drwxrwxr-x  2 ubuntu ubuntu 4.0K Nov  3 03:00 mautic-data
drwxrwxr-x  2 ubuntu ubuntu 4.0K Nov  3 03:00 mautic-db
drwxr-xr-x  5 ubuntu ubuntu  12K Oct 23 03:00 mongodb
drwxrwxr-x  2 ubuntu ubuntu 4.0K Nov  3 03:00 n8n
drwx------  2 ubuntu ubuntu 4.0K Oct 24 21:17 n8n-postgres
drwxr-xr-x  6 ubuntu ubuntu 4.0K Oct 23 03:00 odoo

---

## 📝 Quick Reference

### Most Used Commands



---

## 📞 Support Notes

- **Backups:** Automated daily to /mnt/backups and Cloudflare R2
- **Monitoring:** Grafana dashboard at https://grafana.ai-impress.com
- **Logs:** Centralized in /opt/05-backups/logs/
- **Documentation:** Full docs in Outline Wiki

**Generated:** Mon Nov  3 10:21:32 UTC 2025
**Host:** ai-impress-prod (51.89.231.46)

