-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathdocker-compose.yml
110 lines (110 loc) · 2.96 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
version: "3.3"
services:
db:
image: postgres:15
restart: always
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
ports:
- "5433:5432"
volumes:
- ./database/local_db:/var/lib/postgresql/data
command: ["postgres", "-c", "log_statement=all", "-c", "log_destination=syslog"]
data-service:
build:
context: .
dockerfile: data/Dockerfile
image: data-server
platform: linux/amd64
ports:
- "5003:5000"
env_file:
- .env
environment:
- DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}
- REDIS_URL=redis://redis:6379
- APP_NAME=crypto-bot-data
- MODEL_APP_URL=http://model-service:5000
- EXECUTION_APP_URL=http://execution-service:5000
- PORT=5000
- LOGGER_LEVEL=INFO
volumes:
- ./database/model:/usr/src/app/database/model
model-service:
build:
context: .
dockerfile: model/Dockerfile.web
image: model-server
platform: linux/amd64
ports:
- "5001:5000"
env_file:
- .env
environment:
- DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}
- REDIS_URL=redis://redis:6379
- APP_NAME=crypto-bot-model
- PORT=5000
- LOGGER_LEVEL=DEBUG
volumes:
- ./database/model:/usr/src/app/database/model
- ./model/strategies/models:/usr/src/app/model/strategies/models
model-worker:
build:
context: .
dockerfile: model/Dockerfile.worker
image: model-worker
platform: linux/amd64
env_file:
- .env
environment:
- DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}
- REDIS_URL=redis://redis:6379
- EXECUTION_APP_URL=http://execution-service:5000
depends_on:
- redis
volumes:
- ./database/model:/usr/src/app/database/model
- ./model/strategies/models:/usr/src/app/model/strategies/models
execution-service:
build:
context: .
dockerfile: execution/Dockerfile
image: execution-server
platform: linux/amd64
ports:
- "5002:5002"
env_file:
- .env
environment:
- DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}
- REDIS_URL=redis://redis:6379
- APP_NAME=crypto-bot-execution
- PORT=5000
- LOGGER_LEVEL=DEBUG
- SNAPSHOTS_INTERVAL=180
volumes:
- ./database/model:/usr/src/app/database/model
redis:
image: redis
volumes:
- redis-data:/data
dashboard:
build:
context: .
dockerfile: dashboard/Dockerfile
image: dashboard-server
ports:
- "3000:3000"
environment:
- REACT_APP_DATA_API_HOST=http://localhost:5003
- REACT_APP_EXECUTION_API_HOST=http://localhost:5002
volumes:
- ./dashboard/src:/app/src
volumes:
db:
driver: local
redis-data:
driver: local