Major accomplishments: - ✅ SELinux policy installed and working - ✅ Core Traefik v2.10 deployment running - ✅ Production configuration ready (v3.1) - ✅ Monitoring stack configured - ✅ Comprehensive documentation created - ✅ Security hardening implemented Current status: - 🟡 Partially deployed (60% complete) - ⚠️ Docker socket access needs resolution - ❌ Monitoring stack not deployed yet - ⚠️ Production migration pending Next steps: 1. Fix Docker socket permissions 2. Deploy monitoring stack 3. Migrate to production config 4. Validate full functionality Files added: - Complete Traefik deployment documentation - Production and test configurations - Monitoring stack configurations - SELinux policy module - Security checklists and guides - Current status documentation
134 lines
2.7 KiB
YAML
134 lines
2.7 KiB
YAML
version: '3.9'
|
|
|
|
services:
|
|
redis_master:
|
|
image: redis:7-alpine
|
|
command:
|
|
- redis-server
|
|
- --maxmemory
|
|
- 1gb
|
|
- --maxmemory-policy
|
|
- allkeys-lru
|
|
- --appendonly
|
|
- "yes"
|
|
- --tcp-keepalive
|
|
- "300"
|
|
- --timeout
|
|
- "300"
|
|
volumes:
|
|
- redis_data:/data
|
|
networks:
|
|
- database-network
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 30s
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 1.2G
|
|
cpus: '0.5'
|
|
reservations:
|
|
memory: 512M
|
|
cpus: '0.1'
|
|
placement:
|
|
constraints:
|
|
- "node.labels.role==db"
|
|
replicas: 1
|
|
|
|
redis_replica:
|
|
image: redis:7-alpine
|
|
command:
|
|
- redis-server
|
|
- --slaveof
|
|
- redis_master
|
|
- "6379"
|
|
- --maxmemory
|
|
- 512m
|
|
- --maxmemory-policy
|
|
- allkeys-lru
|
|
- --appendonly
|
|
- "yes"
|
|
- --tcp-keepalive
|
|
- "300"
|
|
volumes:
|
|
- redis_replica_data:/data
|
|
networks:
|
|
- database-network
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 45s
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 768M
|
|
cpus: '0.25'
|
|
reservations:
|
|
memory: 256M
|
|
cpus: '0.05'
|
|
placement:
|
|
constraints:
|
|
- "node.labels.role!=db"
|
|
replicas: 2
|
|
depends_on:
|
|
- redis_master
|
|
|
|
redis_sentinel:
|
|
image: redis:7-alpine
|
|
command:
|
|
- redis-sentinel
|
|
- /etc/redis/sentinel.conf
|
|
configs:
|
|
- source: redis_sentinel_config
|
|
target: /etc/redis/sentinel.conf
|
|
networks:
|
|
- database-network
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "-p", "26379", "ping"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 30s
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 128M
|
|
cpus: '0.1'
|
|
reservations:
|
|
memory: 64M
|
|
cpus: '0.05'
|
|
replicas: 3
|
|
depends_on:
|
|
- redis_master
|
|
|
|
volumes:
|
|
redis_data:
|
|
driver: local
|
|
driver_opts:
|
|
type: none
|
|
o: bind
|
|
device: /opt/redis/master
|
|
redis_replica_data:
|
|
driver: local
|
|
|
|
configs:
|
|
redis_sentinel_config:
|
|
content: |
|
|
port 26379
|
|
dir /tmp
|
|
sentinel monitor mymaster redis_master 6379 2
|
|
sentinel auth-pass mymaster yourpassword
|
|
sentinel down-after-milliseconds mymaster 5000
|
|
sentinel parallel-syncs mymaster 1
|
|
sentinel failover-timeout mymaster 10000
|
|
sentinel deny-scripts-reconfig yes
|
|
|
|
networks:
|
|
database-network:
|
|
external: true
|