Files
XauBot/docker-compose.yml
T
GifariKemal a3d5d654c4 feat: early cut grace period + AI assistant card + filter UX cleanup
- Add 15-min grace period before early cut (wait 1 M15 candle to develop)
- Replace equity chart with AI Assistant card (real-time insights in Indonesian)
- Merge filter toggles into EntryFilterCard (remove separate FiltersConfigCard)
- Fix filter config API URL typo (8001 → 8000)
- Fix tooltip blocking switch clicks (move Switch outside TooltipTrigger)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 08:57:50 +07:00

108 lines
2.9 KiB
YAML

services:
# PostgreSQL Database
postgres:
image: postgres:16-alpine
container_name: trading_bot_db
restart: unless-stopped
environment:
POSTGRES_USER: ${DB_USER:-trading_bot}
POSTGRES_PASSWORD: ${DB_PASSWORD:-trading_bot_2026}
POSTGRES_DB: ${DB_NAME:-trading_db}
TZ: Asia/Jakarta
ports:
- "${DB_PORT:-5432}:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./docker/init-db:/docker-entrypoint-initdb.d:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-trading_bot} -d ${DB_NAME:-trading_db}"]
interval: 10s
timeout: 5s
retries: 5
networks:
- trading_bot_network
# Trading Bot API (reads bot_status.json from shared volume)
trading-api:
build:
context: .
dockerfile: Dockerfile
container_name: trading_bot_api
restart: unless-stopped
environment:
TZ: Asia/Jakarta
DB_HOST: postgres
DB_PORT: 5432
DB_NAME: ${DB_NAME:-trading_db}
DB_USER: ${DB_USER:-trading_bot}
DB_PASSWORD: ${DB_PASSWORD:-trading_bot_2026}
ports:
- "${API_PORT:-8000}:8000"
volumes:
# Mount data/ for reading bot_status.json and writing filter_config.json
- ./data:/app/data
depends_on:
postgres:
condition: service_healthy
networks:
- trading_bot_network
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/api/health')"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
# Web Dashboard (Next.js Frontend)
dashboard:
build:
context: ./web-dashboard
dockerfile: Dockerfile
container_name: trading_bot_dashboard
restart: unless-stopped
ports:
- "${DASHBOARD_PORT:-3000}:3000"
depends_on:
trading-api:
condition: service_healthy
networks:
- trading_bot_network
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:3000"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
# pgAdmin (OPTIONAL - for database management)
pgadmin:
image: dpage/pgadmin4:latest
container_name: trading_bot_pgadmin
restart: unless-stopped
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_EMAIL:-admin@trading.local}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_PASSWORD:-admin123}
PGADMIN_CONFIG_SERVER_MODE: 'False'
ports:
- "${PGADMIN_PORT:-5050}:80"
volumes:
- pgadmin_data:/var/lib/pgadmin
depends_on:
postgres:
condition: service_healthy
networks:
- trading_bot_network
profiles:
- admin # Only start with: docker-compose --profile admin up
volumes:
postgres_data:
name: trading_bot_postgres_data
pgadmin_data:
name: trading_bot_pgadmin_data
networks:
trading_bot_network:
name: trading_bot_network
driver: bridge