Skip to content

Docker Compose Deployment ​

Deploy GitWire with a single docker compose up -d.

Architecture ​

GitWire runs 9 containers:

ContainerImagePortPurpose
gitwire-appBuilt from source3000Express API + 9 background workers
gitwire-dashboardBuilt from source3001Next.js 16 dashboard
gitwire-botBuilt from source3002Telegram bot
gitwire-landingBuilt from source80Landing page
gitwire-demoBuilt from source80Demo dashboard
gitwire-docsBuilt from source80VitePress documentation
cloudflaredcloudflare/cloudflared—Cloudflare Tunnel
postgrespostgres:16-alpine5432PostgreSQL database
redisredis:7-alpine6379BullMQ job queues

Step 1: Clone the Repository ​

bash
git clone https://github.com/Octo-Lex/GitWire.git
cd GitWire

Step 2: Configure Environment ​

bash
cp packages/web/.env.example packages/web/.env

Edit .env and fill in all required values. See the Environment Variables page for the full reference.

Minimum required variables:

bash
GITHUB_APP_ID=your_app_id
GITHUB_WEBHOOK_SECRET=your-webhook-secret
GITHUB_PRIVATE_KEY_PATH=./gitwire-hq.private-key.pem
DATABASE_URL=postgresql://gitwire:changeme@postgres:5432/gitops_hub
REDIS_URL=redis://redis:6379
ANTHROPIC_API_KEY=your-anthropic-key
APP_BASE_URL=https://gitwire.yourdomain.com

Step 3: Place the PEM Key ​

Copy your GitHub App private key to the secrets directory:

bash
mkdir -p /opt/gitwire/secrets
cp gitwire-hq.private-key.pem /opt/gitwire/secrets/

The PEM key is mounted as a read-only Docker volume and survives container rebuilds.

Step 4: Start the Stack ​

bash
cd packages/web
docker compose -f docker-compose.prod.yml up -d

PostgreSQL automatically runs all migrations from db/migrations/ on first start only via docker-entrypoint-initdb.d.

⚠️ IMPORTANT: Migrations are only applied when the database is created for the first time. On subsequent restarts and rebuilds, new migration files are NOT applied automatically. See the Deployment Runbook for the manual migration procedure.

Step 5: Verify ​

bash
# Check container health
docker compose ps

# Check API health
curl https://gitwire.yourdomain.com/health

# Check logs
docker compose logs -f gitwire-app

The health endpoint returns:

json
{
  "status": "ok",
  "version": "0.1.0",
  "uptime": 12345,
  "workers": 9,
  "queues": ["webhook-events", "triage", "ci-healing", "sync", "maintainer", "issue-fix", "phase2", "phase3", "phase4"]
}

Updating ​

bash
git pull origin master
docker compose -f docker-compose.prod.yml up -d --build

The app container is rebuilt from source. Database and Redis data persist in named volumes.

Troubleshooting ​

Container won't start ​

bash
docker compose logs gitwire-app

Database connection failed ​

Ensure DATABASE_URL uses the Docker service name postgres, not localhost:

DATABASE_URL=postgresql://gitwire:password@postgres:5432/gitops_hub

Dashboard shows connection error ​

The dashboard needs NEXT_PUBLIC_API_URL set to the public URL:

NEXT_PUBLIC_API_URL=https://gitwire.yourdomain.com

Next Step ​

→ Cloudflare Tunnel Setup

Released under the MIT License.