-
Notifications
You must be signed in to change notification settings - Fork 154
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
107 lines (99 loc) 路 2.35 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
107 lines (99 loc) 路 2.35 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
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
name: chatbotx
include:
- docker-compose.yml
x-service-common: &service-common
platform: linux/amd64
restart: unless-stopped
env_file:
- ./.env
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
- chatbotx-network
x-worker-common: &worker-common
<<: *service-common
build:
context: .
dockerfile: apps/worker/docker/Dockerfile
services:
builder:
<<: *service-common
# image: chatbotx-builder:latest
build:
context: .
dockerfile: apps/builder/docker/Dockerfile
ports:
- "3123:3000"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
filesystem:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/api/health"]
interval: 30s
timeout: 10s
retries: 3
environment:
- RUN_DB_MIGRATE=true
- RUN_DB_SEED=true
# BullMQ Worker
worker:
<<: *worker-common
networks:
- chatbotx-network
- javascript-executor-network
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
filesystem:
condition: service_healthy
javascript-executor:
condition: service_healthy
environment:
- JAVASCRIPT_EXECUTOR_URL=http://javascript-executor:3210
javascript-executor:
platform: linux/amd64
restart: unless-stopped
build:
context: .
dockerfile: apps/javascript-executor/docker/Dockerfile
environment:
JAVASCRIPT_EXECUTOR_TOKEN: ${JAVASCRIPT_EXECUTOR_TOKEN:-change-me-in-production-at-least-32-chars}
MAX_CONCURRENCY: ${MAX_CONCURRENCY:-2}
networks:
- javascript-executor-network
cap_drop:
- ALL
security_opt:
- no-new-privileges:true
read_only: true
tmpfs:
- /tmp:size=16m,noexec,nosuid,nodev
pids_limit: 128
deploy:
resources:
limits:
cpus: "2"
memory: 512M
pids: 128
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3210/health"]
interval: 30s
timeout: 10s
retries: 3
realtime:
<<: *service-common
build:
context: .
dockerfile: apps/realtime/docker/Dockerfile
ports:
- "1999:1999"
networks:
javascript-executor-network:
driver: bridge
internal: true