exchange-data-manager/docker-compose.yml

64 lines
1.3 KiB
YAML

# Exchange Data Manager - Docker Compose Stack
# Usage: docker-compose up -d
version: '3.8'
services:
exchange-data-manager:
build:
context: .
dockerfile: Dockerfile
image: exchange-data-manager:latest
container_name: exchange-data-manager
restart: unless-stopped
ports:
- "8080:8080" # REST API
- "8765:8765" # WebSocket
volumes:
# Persist database
- edm-data:/app/data
# Mount config file (optional)
- ./config.yaml:/app/config.yaml:ro
environment:
- EDM_HOST=0.0.0.0
- EDM_REST_PORT=8080
- EDM_WS_PORT=8765
- EDM_DB_PATH=/app/data/candles.db
# Logging
- LOG_LEVEL=INFO
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8080/health')"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
# Resource limits (adjust based on expected load)
deploy:
resources:
limits:
cpus: '2.0'
memory: 2G
reservations:
cpus: '0.5'
memory: 512M
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
volumes:
edm-data:
driver: local
# Optional: Add nginx reverse proxy for production
# networks:
# default:
# name: edm-network