Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
50 lines (44 loc) · 1.77 KB
/
Copy pathdocker-compose.yml
File metadata and controls
50 lines (44 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# ============================================================================
# OptionsCanvas — docker-compose
#
# One-line up: docker compose up -d
# Open the wizard: http://localhost:5001/setup
# Stop: docker compose down
# Wipe state (keeps config): docker compose down --volumes → restart
#
# Volumes are bind-mounts so your config and SQLite live in the repo dir,
# not buried in a Docker volume. Editing config/config.json on the host
# is reflected inside the container immediately (next request).
# ============================================================================
services:
optionscanvas:
build: .
image: optionscanvas:latest
container_name: optionscanvas
restart: unless-stopped
ports:
# Host:Container. Change the host side if 5001 is taken by something else.
- "5001:5001"
volumes:
# Persist credentials. The setup wizard writes to config/config.json
# and that file lives on your host so a container rebuild doesn't
# wipe your broker keys.
- ./config:/app/config:rw
# Persist the trading database (positions, orders, journal, supported
# symbols). Same idea — outlives container rebuilds.
- ./assisted_trading/state:/app/assisted_trading/state:rw
# Persist daily journal/log files for after-action review.
- ./assisted_trading/journal:/app/assisted_trading/journal:rw
- ./assisted_trading/logs:/app/assisted_trading/logs:rw
healthcheck:
test: ["CMD", "curl", "-fsS", "http://127.0.0.1:5001/api/health"]
interval: 30s
timeout: 5s
retries: 3
start_period: 20s
# Sensible logging defaults so logs don't grow unbounded.
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"