Initial commit: Vault Dashboard for options hedging
- FastAPI + NiceGUI web application - QuantLib-based Black-Scholes pricing with Greeks - Protective put, laddered, and LEAPS strategies - Real-time WebSocket updates - TradingView-style charts via Lightweight-Charts - Docker containerization - GitLab CI/CD pipeline for VPS deployment - VPN-only access configuration
This commit is contained in:
63
docker-compose.prod.yml
Normal file
63
docker-compose.prod.yml
Normal file
@@ -0,0 +1,63 @@
|
||||
services:
|
||||
app:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
image: vault-dash:prod
|
||||
ports:
|
||||
- "8000:8000"
|
||||
environment:
|
||||
APP_ENV: production
|
||||
APP_HOST: 0.0.0.0
|
||||
APP_PORT: 8000
|
||||
LOG_LEVEL: INFO
|
||||
REDIS_URL: redis://redis:6379/0
|
||||
CACHE_TTL: 300
|
||||
DEFAULT_SYMBOL: GLD
|
||||
UVICORN_WORKERS: 2
|
||||
RUN_MIGRATIONS: 0
|
||||
depends_on:
|
||||
redis:
|
||||
condition: service_healthy
|
||||
read_only: true
|
||||
tmpfs:
|
||||
- /tmp
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
cap_drop:
|
||||
- ALL
|
||||
restart: always
|
||||
mem_limit: 512m
|
||||
cpus: 1.00
|
||||
pids_limit: 256
|
||||
healthcheck:
|
||||
test: ["CMD", "python", "-c", "import sys, urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/health', timeout=3); sys.exit(0)"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 20s
|
||||
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
command: ["redis-server", "--save", "", "--appendonly", "no"]
|
||||
read_only: true
|
||||
tmpfs:
|
||||
- /tmp
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
cap_drop:
|
||||
- ALL
|
||||
restart: always
|
||||
mem_limit: 256m
|
||||
cpus: 0.50
|
||||
pids_limit: 128
|
||||
volumes:
|
||||
- redis-data:/data
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 10s
|
||||
timeout: 3s
|
||||
retries: 5
|
||||
|
||||
volumes:
|
||||
redis-data:
|
||||
Reference in New Issue
Block a user