Skip to content

Production Infrastructure ​

This document is version-controlled and survives agent memory compaction. If you are an AI agent starting a new session and working on GitWire, read this file first — it contains the deployment topology you need.

Host: Proxmox VE ​

PropertyValue
Address192.168.3.5
SSH[email protected] (key-based)
Web UIhttps://192.168.3.5:8006
VersionPVE 8.4.10
Kernel6.8.12-13-pve
StorageNVMe with LVM

Other Running CTs/VMs on the Same Host ​

VMIDNameTypeStatus
100onestretchCTRunning
101ShadowBrokerCTRunning
114openwand-vmVMRunning
115gitwireCTRunning
150clarityitCTRunning
216gat-platform-2CTRunning
500freqtradeCTRunning
600startup-in-a-boxCTRunning
801nodechainCTRunning

Container: CT 115 — gitwire ​

PropertyValue
Hostnamegitwire
IP192.168.3.151/24
Gateway192.168.3.1
Bridgevmbr0
OSUbuntu (LXC)
Archamd64
Featuresnesting=1 (required for Docker-in-LXC)
AppArmorunconfined
Bootonboot: 1
PrivilegedNo (unprivileged: 0)

Resource Allocation ​

ResourceCurrentRecommended (v0.20+)Notes
CPU2 cores2 coresSufficient for current workload
RAM2 GB4 GBSwap at 58% under load; validator containers need headroom
Disk16 GB (LVM)16 GB68% used — monitor Docker image growth
Swap512 MB512 MBAcceptable as safety net

Adjusting Resources ​

bash
# SSH to Proxmox host
ssh [email protected]

# Bump RAM to 4 GB (requires restart)
pct set 115 --memory 4096
pct reboot 115

# Verify
pct config 115

Docker Containers (9 services) ​

ContainerPortPurpose
gitwire-app3000Express API + 9 background workers
gitwire-dashboard3001Next.js dashboard
gitwire-bot3002Telegram bot
gitwire-landing80Landing page
gitwire-demo80Demo dashboard
gitwire-docs80VitePress documentation
gitwire-tunnel—Cloudflare Tunnel (outbound only)
gitwire-postgres5432PostgreSQL 16
gitwire-redis6379Redis 7 (BullMQ queues)

Deployment Directory ​

All GitWire files live at /opt/gitwire inside CT 115:

/opt/gitwire/
├── .env                    # Production environment variables
├── secrets/                # GitHub App private key (PEM)
├── docker-compose.yml      # Service definitions
├── packages/web/.env       # App-level env
├── db/migrations/          # SQL migration files
└── ...                     # Full repo checkout

SSH Access ​

bash
# Direct SSH to the container (key-based)
ssh [email protected]

# Or via Proxmox host
ssh [email protected]
pct exec 115 -- bash

# With SSH config alias
ssh gitwire

External Access ​

ServiceURL
APIhttps://gitwire.erlab.uk
Dashboardhttps://gitwire.erlab.uk/dashboard
Webhookhttps://gitwire.erlab.uk/webhooks/github
Docshttps://gitwire.erlab.uk/docs

All external access is via Cloudflare Tunnel — no inbound ports are opened on the container or host.

Database: PostgreSQL 16 ​

PropertyValue
Containergitwire-postgres-1
Databasegitops_hub
Usergitwire
Volumegitwire_postgres_data (named volume)
Size~17 MB (light — early deployment)

Connecting ​

bash
# Inside CT 115
docker exec -it gitwire-postgres-1 psql -U gitwire -d gitops_hub

Schema Migration Status ​

Migrations are applied via PostgreSQL's docker-entrypoint-initdb.d mechanism, which only runs on first database creation. There is no migration runner in the app startup code.

This means new migration files added after the initial database creation are NOT automatically applied. They must be run manually.

See the Deployment Runbook for the manual migration procedure.

Redis 7 ​

PropertyValue
Containergitwire-redis-1
Volumegitwire_redis_data
Keys~4,500 (BullMQ job data)
Memory~75 MB used

⚠️ No maxmemory limit is configured. In a 2 GB container running 9 services, Redis can grow unbounded and trigger OOM. Set maxmemory 256mb and maxmemory-policy allkeys-lru in the Redis command.

Active Deployments ​

GitWire is installed on 4 GitHub App installations covering 32 repositories.

InstallationRepos
Alajmah (personal)14 repos
Octo-Lex (org)10 repos
Tech-Innovate (org)7 repos
Startup-White-Box (org)1 repo

Real Activity (as of v0.20.0) ​

MetricValue
CI runs tracked1,239
CI failures healed36
CI heal attempts32
AI reviews88
Webhooks processed392
Issue embeddings10

LLM Provider ​

PropertyValue
ProviderZ.AI (Anthropic-compatible)
Base URLhttps://api.z.ai/api/anthropic
ModelClaude (via Z.AI gateway)

GitWire uses the Anthropic SDK pointed at Z.AI's compatibility endpoint. No direct Anthropic API key is required — the Z.AI key works with the SDK's baseURL override.

GitHub App ​

PropertyValue
App NameGitWire-HQ
App ID3727207
Client IDIv23liznUpaw9BDzmYBp
Webhook SecretSet in /opt/gitwire/packages/web/.env
Client SecretSet in /opt/gitwire/packages/web/.env
Private Key FileGitwire-hq.2026-05-15.private-key.pem (original download name)
Deployed Key Path/opt/gitwire/secrets/gitwire-hq.pem
Container Key PathVolume-mounted to gitwire-hq.private-key.pem
Env VarGITHUB_PRIVATE_KEY_PATH=./gitwire-hq.2026-05-15.private-key.pem

⚠️ PEM Key Security Note ​

The .dockerignore was missing *.pem, so the private key was baked into the Docker image via COPY . .. This has been fixed — .dockerignore now excludes *.pem and secrets/. The key should ONLY be available via the volume mount in docker-compose.yml.

After the next rebuild, verify the key is NOT in the image:

bash
docker exec gitwire-gitwire-app-1 ls -la /app/packages/web/gitwire-hq.2026-05-15.private-key.pem
# Should return: No such file or directory

Cloudflare Tunnel ​

PropertyValue
Domaingitwire.erlab.uk
Zoneerlab.uk
Tunnel TypeToken-based (remotely managed via Cloudflare dashboard)
ProtocolQUIC
Connections4 active (connIndex 0–3)
Edge Locationsjed02 (Jeddah), mrs06 (Marseille)
TokenSet as TUNNEL_TOKEN in /opt/gitwire/.env
Containercloudflare/cloudflared:latest

Public Hostname Routing ​

All routing is configured remotely in the Cloudflare Zero Trust dashboard. No local config file exists.

URL PathServicePort
/healthgitwire-app3000
/webhooks/*gitwire-app3000
/dashboardgitwire-dashboard3001
/docsgitwire-docs80
/ (landing)gitwire-landing80

Verifying Tunnel Health ​

bash
# From inside CT 115
curl -s https://gitwire.erlab.uk/health
# Expected: {"status":"ok"}

# Tunnel container logs
docker logs gitwire-tunnel-1 --tail 20
# Look for "Registered tunnel connection" — 4 connections = healthy

# Intermittent QUIC timeouts are normal (edge rebalancing)

Released under the MIT License.