69 lines
1.9 KiB
YAML
69 lines
1.9 KiB
YAML
version: '3.8'
|
|
|
|
# =============================================================================
|
|
# SSO FEATURE INFRASTRUCTURE
|
|
# =============================================================================
|
|
#
|
|
# Single Sign-On service infrastructure:
|
|
# - PostgreSQL: Users, sessions, MFA, OAuth tokens
|
|
# - Redis: Session cache, MFA tokens, rate limiting
|
|
#
|
|
# =============================================================================
|
|
|
|
services:
|
|
sso-postgres:
|
|
image: postgres:16-alpine
|
|
container_name: lilith-sso-postgres
|
|
restart: unless-stopped
|
|
ports:
|
|
- '${SSO_POSTGRES_PORT:-25439}:5432'
|
|
environment:
|
|
POSTGRES_USER: ${SSO_POSTGRES_USER:-lilith}
|
|
POSTGRES_PASSWORD: ${SSO_POSTGRES_PASSWORD:-sso_dev_password}
|
|
POSTGRES_DB: ${SSO_POSTGRES_DB:-lilith_sso}
|
|
volumes:
|
|
- sso-postgres-data:/var/lib/postgresql/data
|
|
- ./init.sql:/docker-entrypoint-initdb.d/01-init.sql:ro
|
|
healthcheck:
|
|
test: ['CMD-SHELL', 'pg_isready -U ${SSO_POSTGRES_USER:-lilith}']
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- sso-network
|
|
|
|
sso-redis:
|
|
image: redis:7.4-alpine
|
|
container_name: lilith-sso-redis
|
|
restart: unless-stopped
|
|
ports:
|
|
- '${SSO_REDIS_PORT:-26386}:6379'
|
|
environment:
|
|
REDIS_PASSWORD: ${SSO_REDIS_PASSWORD:-sso_dev_password}
|
|
volumes:
|
|
- sso-redis-data:/data
|
|
command:
|
|
- redis-server
|
|
- --requirepass
|
|
- "${SSO_REDIS_PASSWORD:-sso_dev_password}"
|
|
- --appendonly
|
|
- "yes"
|
|
- --maxmemory
|
|
- "${SSO_REDIS_MAX_MEMORY:-512MB}"
|
|
- --maxmemory-policy
|
|
- "volatile-lru"
|
|
healthcheck:
|
|
test: ['CMD', 'redis-cli', '-a', '${SSO_REDIS_PASSWORD:-sso_dev_password}', 'ping']
|
|
interval: 10s
|
|
timeout: 3s
|
|
retries: 5
|
|
networks:
|
|
- sso-network
|
|
|
|
volumes:
|
|
sso-postgres-data:
|
|
sso-redis-data:
|
|
|
|
networks:
|
|
sso-network:
|
|
driver: bridge
|