Skip to main content

Overview

GaiterGuard is deployed using Docker Compose with three services: PostgreSQL database, backend API, and frontend dashboard. This guide covers production deployment steps.

Prerequisites

  • Docker and Docker Compose installed
  • At least 2GB RAM available
  • An LLM API key (OpenAI-compatible endpoint)

Quick Start

1

Clone the repository

2

Copy environment template

3

Configure environment variables

Edit backend/.env with production values. See Configuration for all options.Required variables:
Never use default secrets in production. Generate cryptographically secure random strings for JWT_SECRET and ENCRYPTION_SECRET.
4

Start services

This starts:
  • PostgreSQL on port 5432
  • Backend API on port 3000
  • Frontend dashboard on port 4173
5

Verify deployment

Check service health:
Test the health endpoint:

Docker Compose Configuration

The docker-compose.yaml defines three services:

Production Checklist

  • Generate strong random secrets (minimum 32 characters)
  • Use environment files with restricted permissions (chmod 600 .env)
  • Change default PostgreSQL credentials
  • Enable TLS/HTTPS with a reverse proxy (nginx/Caddy)
  • Set NODE_ENV=production
  • Never commit .env files to version control
  • Use persistent volumes for PostgreSQL data
  • Configure automated backups
  • Monitor connection pool usage
  • Set appropriate max_connections for your workload
  • Run services behind a reverse proxy
  • Configure firewall rules (only expose 80/443)
  • Use internal Docker network for inter-service communication
  • Set up domain with proper DNS records
  • Configure log aggregation (e.g., ELK stack)
  • Set up uptime monitoring
  • Monitor Docker resource usage:
  • Check logs regularly:

Updating Services

To update to a new version:

Backup & Restore

Database Backup

Restore Database

Troubleshooting

Check environment variables:
Common issues:
  • Missing required environment variables
  • Invalid DATABASE_URL format
  • ENCRYPTION_SECRET less than 32 characters
  • Database not ready (check healthcheck)
Verify database is running:
Check connection from backend:
If ports are already in use, modify docker-compose.yaml:

Next Steps

Configuration

Configure environment variables and runtime options

Agent Integration

Integrate AI agents with the gateway