44# Complete application stack for the Unthread Webhook Server
55#
66# Services:
7- # ┌─ webhook-server → Main webhook processing application
8- # └─ redis-webhook → Redis for webhook message queuing
7+ # ┌─ server → Main webhook processing application (builds from source)
8+ # └─ redis-webhook → Redis 8-alpine for webhook message queuing
9+ #
10+ # Docker Container Naming:
11+ # - server → unthread-webhook-server-server-1
12+ # - redis-webhook → unthread-webhook-server-redis-webhook-1
913#
1014# Usage:
1115# docker-compose up -d # Start all services
12- # docker-compose logs -f webhook- server # View webhook server logs
16+ # docker-compose logs -f server # View webhook server logs
1317# docker-compose exec redis-webhook redis-cli
18+ # docker-compose down # Stop all services
19+ # docker-compose down -v # Stop and remove volumes
1420#
1521# Prerequisites:
16- # - Copy .env.example to .env and configure your tokens
17- # - Ensure external network exists: docker network create unthread-integration-network
22+ # - Copy .env.example to .env and configure your values
23+ # - Ensure Docker and Docker Compose are installed
1824#
1925# =============================================================================
2026
21- version : ' 3.8'
22-
2327services :
2428 # =============================================================================
2529 # REDIS - WEBHOOK OPERATIONS
2630 # =============================================================================
2731 # Dedicated Redis instance for webhook message queuing and communication
2832 redis-webhook :
29- image : redis:7-alpine
33+ image : redis:8-alpine
34+ container_name : unthread-webhook-server-redis-webhook-1
3035 ports :
3136 - " 6379:6379"
3237 volumes :
3338 - redis_webhook_data:/data
39+ command : redis-server --appendonly yes # Enable data persistence
3440 restart : unless-stopped
3541 healthcheck :
3642 test : ["CMD", "redis-cli", "ping"]
3743 interval : 30s
38- timeout : 3s
39- retries : 3
40- start_period : 30s
44+ timeout : 5s
45+ retries : 5
4146 networks :
4247 - unthread-integration-network
4348
4449 # =============================================================================
4550 # WEBHOOK SERVER APPLICATION
4651 # =============================================================================
47- # Handles incoming webhooks from Unthread and processes them
48- webhook-server :
49- image : wgtechlabs/unthread-webhook-server:latest
50- container_name : docker-unthread-webhook-server
52+ # Main Node.js application that handles webhook processing and Redis queuing
53+ server :
54+ image : unthread-webhook-server:latest # Explicit image name for consistency
55+ build :
56+ context : .
57+ container_name : unthread-webhook-server-server-1
5158 ports :
5259 - " 3000:3000"
5360 env_file :
5461 - .env
55- environment :
56- - REDIS_URL=redis://redis-webhook:6379
5762 depends_on :
5863 redis-webhook :
59- condition : service_healthy
64+ condition : service_healthy # Wait for Redis to be ready
6065 restart : unless-stopped
6166 healthcheck :
6267 test : ["CMD", "curl", "-f", "http://localhost:3000/health"]
@@ -77,8 +82,8 @@ volumes:
7782# =============================================================================
7883# NETWORKING
7984# =============================================================================
80- # External network for communication between services
81- # Create with: docker network create unthread-integration-network
85+ # Docker Compose will automatically create and manage this network
8286networks :
8387 unthread-integration-network :
84- external : true
88+ driver : bridge
89+ name : unthread-integration-network # Use explicit name for consistency
0 commit comments