kir / docker-compose.yml
jwadow
fix(docker): improve Docker configuration and CI/CD pipeline
999d28d
Raw
History Blame Contribute Delete
2.47 kB
version: '3.8'
services:
kiro-gateway:
build:
context: .
dockerfile: Dockerfile
container_name: kiro-gateway
ports:
- "8000:8000"
environment:
# Server configuration
- SERVER_HOST=0.0.0.0
- SERVER_PORT=8000
# Required: Set your proxy API key
# You can also use .env file (see env_file below)
- PROXY_API_KEY=${PROXY_API_KEY:-my-super-secret-password-123}
# Authentication (choose one method)
# Option 1: Refresh token
- REFRESH_TOKEN=${REFRESH_TOKEN:-}
# Option 2: Profile ARN (optional, for Kiro IDE)
- PROFILE_ARN=${PROFILE_ARN:-}
# Option 3: Credentials file path (mounted as volume below)
- KIRO_CREDS_FILE=${KIRO_CREDS_FILE:-}
# Option 4: kiro-cli SQLite database (mounted as volume below)
- KIRO_CLI_DB_FILE=${KIRO_CLI_DB_FILE:-}
# Optional settings
- KIRO_REGION=${KIRO_REGION:-us-east-1}
- LOG_LEVEL=${LOG_LEVEL:-INFO}
- DEBUG_MODE=${DEBUG_MODE:-off}
# VPN/Proxy settings (for restricted networks)
- VPN_PROXY_URL=${VPN_PROXY_URL:-}
# Alternative: Load all variables from .env file
env_file:
- .env
volumes:
# Mount credentials file (if using KIRO_CREDS_FILE)
# Uncomment and adjust path as needed:
# - ~/.aws/sso/cache:/home/kiro/.aws/sso/cache:ro
# Mount kiro-cli database (if using KIRO_CLI_DB_FILE)
# Uncomment and adjust path as needed:
# - ~/.local/share/kiro-cli:/home/kiro/.local/share/kiro-cli:ro
# Mount debug logs directory (optional, for debugging)
- ./debug_logs:/app/debug_logs
restart: unless-stopped
# Health check
healthcheck:
test: ["CMD", "python", "-c", "import httpx; httpx.get('http://localhost:8000/health', timeout=5)"]
interval: 30s
timeout: 10s
retries: 3
start_period: 5s
# Resource limits (recommended for production)
# Adjust based on your workload and available resources
deploy:
resources:
limits:
cpus: '2' # Maximum CPU cores (streaming can be CPU-intensive)
memory: 1G # Maximum memory (sufficient for FastAPI + streaming)
reservations:
cpus: '0.5' # Minimum guaranteed CPU
memory: 256M # Minimum guaranteed memory
networks:
default:
name: kiro-gateway-network