Files
ai-tax-agent/infra/compose
harkon f0f7674b8d
Some checks failed
CI/CD Pipeline / Code Quality & Linting (push) Has been cancelled
CI/CD Pipeline / Policy Validation (push) Has been cancelled
CI/CD Pipeline / Test Suite (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-coverage) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-extract) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-firm-connectors) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-forms) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-hmrc) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-ingestion) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-kg) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-normalize-map) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-ocr) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-rag-indexer) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-rag-retriever) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-reason) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-rpa) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (ui-review) (push) Has been cancelled
CI/CD Pipeline / Security Scanning (svc-coverage) (push) Has been cancelled
CI/CD Pipeline / Security Scanning (svc-extract) (push) Has been cancelled
CI/CD Pipeline / Security Scanning (svc-kg) (push) Has been cancelled
CI/CD Pipeline / Security Scanning (svc-rag-retriever) (push) Has been cancelled
CI/CD Pipeline / Security Scanning (ui-review) (push) Has been cancelled
CI/CD Pipeline / Generate SBOM (push) Has been cancelled
CI/CD Pipeline / Deploy to Staging (push) Has been cancelled
CI/CD Pipeline / Deploy to Production (push) Has been cancelled
CI/CD Pipeline / Notifications (push) Has been cancelled
clean up base infra
2025-10-11 11:42:43 +01:00
..
2025-10-11 11:42:43 +01:00
2025-10-11 08:41:36 +01:00
2025-10-11 08:41:36 +01:00

External Services

This directory contains Docker Compose configurations for external services that run on the production server.

Services

Traefik

  • Location: traefik/
  • Purpose: Reverse proxy and load balancer for all services
  • Deploy: cd traefik && docker compose up -d
  • Access: https://traefik.harkon.co.uk

Authentik

Gitea

  • Location: gitea/
  • Purpose: Git repository hosting and container registry
  • Deploy: cd gitea && docker compose up -d
  • Access: https://gitea.harkon.co.uk

Nextcloud

Portainer

Deployment

Production (Remote Server)

# SSH to server
ssh deploy@141.136.35.199

# Navigate to service directory
cd /opt/ai-tax-agent/infra/compose/<service>

# Deploy service
docker compose up -d

# Check logs
docker compose logs -f

# Check status
docker compose ps

Local Development

For local development, use the all-in-one compose file:

cd infra/compose
docker compose -f docker-compose.local.yml up -d

Configuration

Each service has its own .env file for environment-specific configuration:

  • traefik/.provider.env - GoDaddy API credentials
  • authentik/.env - Authentik secrets
  • gitea/.env - Gitea database credentials

Networks

All services use shared Docker networks:

  • frontend - Public-facing services
  • backend - Internal services

Create networks before deploying:

docker network create frontend
docker network create backend

Maintenance

Update Service

cd /opt/ai-tax-agent/infra/compose/<service>
docker compose pull
docker compose up -d

Restart Service

cd /opt/ai-tax-agent/infra/compose/<service>
docker compose restart

View Logs

cd /opt/ai-tax-agent/infra/compose/<service>
docker compose logs -f

Backup Data

# Backup volumes
docker run --rm -v <service>_data:/data -v $(pwd):/backup alpine tar czf /backup/<service>-backup.tar.gz /data

Integration with Application

These external services are used by the application infrastructure:

  • Traefik - Routes traffic to application services
  • Authentik - Provides SSO for application UIs
  • Gitea - Hosts Docker images for application services

The application infrastructure is deployed separately using:

./infra/scripts/deploy.sh production infrastructure
./infra/scripts/deploy.sh production services