-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdocker-compose.prod.yml
124 lines (116 loc) · 2.97 KB
/
docker-compose.prod.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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
name: fishbait
services:
nginx:
image: nginx:1.27
ports:
- "80:80"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- app-build:/usr/share/nginx/html:ro
depends_on:
app:
condition: service_completed_successfully
api:
condition: service_started
restart: always
ai:
build:
context: ./ai
args:
MAX_THREADS: ${MAX_THREADS:-1}
image: fishbait-ai
volumes:
- lib:/libvol
command: ["sh", "-c", "cp -r /build/lib /libvol"]
api:
build:
context: ./api
image: fishbait-api
environment:
- STRATEGY_LOCATION=/strategy.hdf
- RELAY_LIB_LOCATION=/libvol/lib/librelay.so
- SESSION_TIMEOUT=${SESSION_TIMEOUT:-86400}
- PIGEON_EXECUTION_TIMEOUT=${PIGEON_EXECUTION_TIMEOUT:-5}
- DD_AGENT_HOST=datadog-agent
- DD_SERVICE=fishbait-api
- DD_ENV=${DD_ENV}
- DD_LOGS_INJECTION=true
- DD_PROFILING_ENABLED=true
- DD_APPSEC_ENABLED=true
depends_on:
ai:
condition: service_completed_successfully
worker:
condition: service_started
redis:
condition: service_started
datadog-agent:
condition: service_started
volumes:
- lib:/libvol
- ./api/src:/api/src
- ${STRATEGY_LOCATION}:/strategy.hdf:ro
command: ["/api/entrypoints/api.prod.sh"]
restart: always
worker:
build:
context: ./api
image: fishbait-api
environment:
- STRATEGY_LOCATION=/strategy.hdf
- RELAY_LIB_LOCATION=/libvol/lib/librelay.so
- SESSION_TIMEOUT=${SESSION_TIMEOUT:-86400}
- PIGEON_EXECUTION_TIMEOUT=${PIGEON_EXECUTION_TIMEOUT:-5}
- DD_AGENT_HOST=datadog-agent
- DD_SERVICE=fishbait-worker
- DD_ENV=${DD_ENV}
- DD_LOGS_INJECTION=true
- DD_PROFILING_ENABLED=true
- DD_APPSEC_ENABLED=true
depends_on:
ai:
condition: service_completed_successfully
redis:
condition: service_started
datadog-agent:
condition: service_started
user: "1000:1000"
volumes:
- lib:/libvol
- ./api/src:/api/src
- ${STRATEGY_LOCATION}:/strategy.hdf:ro
command: ["/api/entrypoints/worker.prod.sh"]
restart: always
app:
build:
context: ./app
image: fishbait-app
volumes:
- app-build:/app/build
command: ["yarn", "build"]
redis:
image: redis:7.4.1
command:
- sh
- -c
- |
redis-server \
--maxmemory ${REDIS_MAXMEMORY:-256mb} \
--maxmemory-policy volatile-lru
restart: always
datadog-agent:
image: "datadog/agent:7"
environment:
- DD_API_KEY=${DD_API_KEY}
- DD_APM_ENABLED=true
- DD_LOGS_ENABLED=true
- DD_LOGS_CONFIG_CONTAINER_COLLECT_ALL=true
- DD_APM_NON_LOCAL_TRAFFIC=true
- DD_DOGSTATSD_NON_LOCAL_TRAFFIC=true
- DD_USE_DOGSTATSD=true
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
restart: always
volumes:
lib:
app-build: