-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
54 lines (50 loc) · 1.06 KB
/
docker-compose.yaml
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
services:
rabbitmq:
image: 'rabbitmq'
restart: always
networks:
- app_network
redis:
image: 'redis'
restart: always
networks:
- app_network
backend:
build:
context: ./server
target: dev
restart: unless-stopped
env_file:
- .env
ports:
- 4000:4000
command: npm run dev
volumes:
- ./server:/app
- /app/node_modules
depends_on:
- rabbitmq
- redis
networks:
- app_network
worker:
pids_limit: 100 # Max number of processes running in the container. Tackle fork bomb
# cpus: 1 # No of CPUs allocated, tackle infinte loop and infinite recursive function
# mem_limit: 150M # Hard limit, tackle inifite loop, recursion without exit conditon, forkbomb
build:
context: ./worker
restart: unless-stopped
env_file:
- .env
command: npm run dev
volumes:
- ./worker:/app
- /app/node_modules
depends_on:
- rabbitmq
- redis
networks:
- app_network
networks:
app_network:
driver: bridge