electric-horses-infra/stacks/eh-search/docker-compose.yml

58 lines
1.3 KiB
YAML
Raw Normal View History

# eh-search Stack on ai-apps
# Service is INTERNAL ONLY - bound to private network 10.0.0.8
# Reached by Pegasus via nginx proxy_pass on 10.0.0.10
services:
eh-search:
build: .
image: eh-search:dev
container_name: eh-search
restart: unless-stopped
env_file: .env
ports:
# Bind ONLY to private network IP, not 0.0.0.0
- "10.0.0.8:8200:8200"
networks:
- eh-search-internal
depends_on:
eh-search-redis:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-fsS", "http://127.0.0.1:8200/health"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
deploy:
resources:
limits:
memory: 512M
cpus: "0.5"
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
eh-search-redis:
image: redis:7-alpine
container_name: eh-search-redis
restart: unless-stopped
command: redis-server --maxmemory 64mb --maxmemory-policy allkeys-lru --save ""
networks:
- eh-search-internal
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 5
deploy:
resources:
limits:
memory: 96M
cpus: "0.2"
networks:
eh-search-internal:
driver: bridge