Warning, /swf-testbed/docker-compose.yml is written in an unsupported language. File is not indexed.
0001 # Docker Compose configuration for SWF Testbed infrastructure services
0002 # Requires Docker Compose v2.x+
0003 #
0004 # This provides PostgreSQL, ActiveMQ Artemis, and Redis for development.
0005 # For production deployment, use system-managed services instead.
0006 #
0007 # Usage:
0008 # docker-compose up -d # Start all services
0009 # docker-compose down # Stop all services
0010 # docker-compose ps # Check service status
0011 # docker-compose logs -f # Follow logs
0012
0013 networks:
0014 swf-network:
0015 driver: bridge
0016 name: swf-network
0017
0018 services:
0019 # PostgreSQL database for swf-monitor
0020 postgres:
0021 image: postgres:16-alpine
0022 container_name: swf-postgres
0023 environment:
0024 POSTGRES_DB: swfdb
0025 POSTGRES_USER: admin
0026 POSTGRES_PASSWORD: your_db_password
0027 ports:
0028 - "5432:5432"
0029 volumes:
0030 - postgres_data:/var/lib/postgresql/data
0031 networks:
0032 - swf-network
0033 restart: unless-stopped
0034 healthcheck:
0035 test: ["CMD-SHELL", "pg_isready -U admin -d swfdb"]
0036 interval: 30s
0037 timeout: 10s
0038 retries: 5
0039 start_period: 10s
0040
0041 # Apache ActiveMQ Artemis message broker
0042 activemq:
0043 image: apache/activemq-artemis:latest-alpine
0044 container_name: swf-activemq
0045 ports:
0046 - "8161:8161" # Web console (admin:admin)
0047 - "61616:61616" # Core protocol port
0048 - "61612:61613" # STOMP protocol port - mapped to 61612 for production compatibility
0049 environment:
0050 - ARTEMIS_USER=admin
0051 - ARTEMIS_PASSWORD=admin
0052 volumes:
0053 - activemq_data:/var/lib/artemis-instance
0054 networks:
0055 - swf-network
0056 restart: unless-stopped
0057 healthcheck:
0058 test: ["CMD-SHELL", "curl -f http://localhost:8161/console/ || exit 1"]
0059 interval: 30s
0060 timeout: 10s
0061 retries: 5
0062 start_period: 40s
0063 # depends_on removed; ActiveMQ does not require PostgreSQL to be healthy
0064
0065 # Redis for Django Channels (SSE streaming multi-process relay)
0066 redis:
0067 image: redis:7-alpine
0068 container_name: swf-redis
0069 ports:
0070 - "6379:6379"
0071 volumes:
0072 - redis_data:/data
0073 networks:
0074 - swf-network
0075 restart: unless-stopped
0076 command: redis-server --appendonly yes
0077 healthcheck:
0078 test: ["CMD", "redis-cli", "ping"]
0079 interval: 10s
0080 timeout: 5s
0081 retries: 3
0082 start_period: 5s
0083
0084 volumes:
0085 postgres_data:
0086 driver: local
0087 name: swf-postgres-data
0088 activemq_data:
0089 driver: local
0090 name: swf-activemq-data
0091 redis_data:
0092 driver: local
0093 name: swf-redis-data