forked from cenab/MSTO
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
51 lines (48 loc) · 1.16 KB
/
docker-compose.yml
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
51
version: '3.8'
services:
app:
build: .
image: msto:latest
container_name: msto-app
environment:
- ENV=dev
- TRADING_MODE=paper
- DB_CONNECTION_STRING=postgresql://msto_user:msto_password@db:5432/msto_db
- POSTGRES_USER=msto_user
- POSTGRES_PASSWORD=msto_password
- POSTGRES_DB=msto_db
volumes:
- .:/app
- ./logs:/app/logs
- ./data:/app/data
depends_on:
- db
ports:
- "8080:8080"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 30s
timeout: 5s
retries: 3
start_period: 60s
command: ["--tickers", "AAPL", "MSFT", "GOOGL", "--strategies", "all"]
db:
image: postgres:14-alpine
container_name: msto-db
environment:
- POSTGRES_USER=msto_user
- POSTGRES_PASSWORD=msto_password
- POSTGRES_DB=msto_db
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U msto_user -d msto_db"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
volumes:
postgres_data:
driver: local