49 lines
1.3 KiB
YAML
49 lines
1.3 KiB
YAML
# Analytics Feature Database Stack
|
|
# Managed by: reconciliation/services/feature-databases.sh
|
|
# Data: Docker volumes (bind mounts require manual directory creation)
|
|
|
|
services:
|
|
analytics-postgres:
|
|
image: timescale/timescaledb:2.16.1-pg16
|
|
container_name: analytics-postgres
|
|
restart: unless-stopped
|
|
ports:
|
|
- '${POSTGRES_PORT:-5433}:5432'
|
|
environment:
|
|
POSTGRES_USER: ${POSTGRES_USER:-lilith}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-analytics_dev}
|
|
POSTGRES_DB: ${POSTGRES_DB:-lilith_analytics}
|
|
volumes:
|
|
- analytics-postgres-data:/var/lib/postgresql/data
|
|
- ./database/init.sql:/docker-entrypoint-initdb.d/01-init.sql:ro
|
|
healthcheck:
|
|
test: ['CMD-SHELL', 'pg_isready -U ${POSTGRES_USER:-lilith}']
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
analytics-redis:
|
|
image: redis:7.4-alpine
|
|
container_name: analytics-redis
|
|
restart: unless-stopped
|
|
ports:
|
|
- '${REDIS_PORT:-6381}:6379'
|
|
volumes:
|
|
- analytics-redis-data:/data
|
|
command:
|
|
- redis-server
|
|
- --appendonly
|
|
- "yes"
|
|
- --maxmemory
|
|
- "512mb"
|
|
- --maxmemory-policy
|
|
- "allkeys-lru"
|
|
healthcheck:
|
|
test: ['CMD', 'redis-cli', 'ping']
|
|
interval: 10s
|
|
timeout: 3s
|
|
retries: 5
|
|
|
|
volumes:
|
|
analytics-postgres-data:
|
|
analytics-redis-data:
|