Docker Configuration
Container configuration for local development and production deployments. IRA FORCE uses Docker Compose for local development and Kubernetes for production.
Overview
The IRA FORCE platform is fully containerized with the following services:
API Gateway
Kong-based API gateway handling routing and rate limiting
Core API
Main Node.js application server
SOC Service
Security Operations Center backend
Notification Service
Push, SMS, and email handler
PostgreSQL
Primary database
Redis
Caching and real-time pub/sub
Local Development Setup
Use Docker Compose to spin up the complete development environment.
Docker Desktop 4.0+ and Docker Compose v2.0+ are required. See the Quickstart Guide for installation instructions.
Quick Start Commands
# Clone the repository
git clone git@github.com:iraforce/platform.git
cd platform
# Copy environment template
cp .env.example .env
# Start all services
docker compose up -d
# View logs
docker compose logs -f api
# Stop all services
docker compose down
For detailed Docker Compose configuration, see the repository:
Docker Images
All IRA FORCE images are stored in our private container registry.
| Service | Image | Port |
|---|---|---|
| API Gateway | registry.iraforce.internal/gateway |
8000 |
| Core API | registry.iraforce.internal/api |
3000 |
| SOC Service | registry.iraforce.internal/soc |
3001 |
| Notification Service | registry.iraforce.internal/notifications |
3002 |
| Worker | registry.iraforce.internal/worker |
- |
Container registry credentials are available in the internal password manager. Contact DevOps if you need access.
Building Images
Build images locally for development or testing.
# Build a specific service
docker build -t iraforce/api:local -f docker/api/Dockerfile .
# Build all services
docker compose build
# Build with no cache
docker compose build --no-cache api
Multi-stage Builds
All Dockerfiles use multi-stage builds to minimize image size. The production images are based on node:20-alpine for optimal performance.
Volumes & Data Persistence
Named volumes are used to persist data across container restarts.
| Volume | Purpose | Mount Path |
|---|---|---|
iraforce_postgres_data |
PostgreSQL database files | /var/lib/postgresql/data |
iraforce_redis_data |
Redis persistence | /data |
iraforce_uploads |
Local file uploads | /app/uploads |
# List volumes
docker volume ls | grep iraforce
# Remove all volumes (⚠️ destroys data)
docker compose down -v
Networking
Services communicate over a custom bridge network.
# Network configuration
networks:
iraforce-network:
driver: bridge
ipam:
config:
- subnet: 172.28.0.0/16
Service Discovery
Services can communicate using container names as hostnames:
http://api:3000- Core APIhttp://soc:3001- SOC Servicepostgres://db:5432- Databaseredis://redis:6379- Redis
Health Checks
All services include health check endpoints for container orchestration.
# Example health check configuration
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
Health endpoints:
GET /health- Basic health checkGET /health/ready- Readiness probeGET /health/live- Liveness probe
Kubernetes Deployment
Production deployments use Kubernetes managed through ArgoCD.
Troubleshooting
Common Issues
Container won't start
# Check logs
docker compose logs api
# Inspect container
docker inspect iraforce-api-1
Port already in use
# Find process using port
lsof -i :3000
# Or change port in .env
APP_PORT=3001
Database connection refused
# Wait for database to be ready
docker compose up -d db
docker compose logs -f db
# Then start other services
docker compose up -d