-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
90 lines (90 loc) · 1.99 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
services:
manager:
develop:
watch:
- action: rebuild
path: ./manager/src/
- action: rebuild
path: ./common/src/
- action: rebuild
path: ./config/src
- action: rebuild
path: ./models/src/
command: npm run dev -- --port ${DERZIS_MNG_PORT} --host
build:
context: ./
dockerfile: ./manager/Dockerfile
# scale: 3
args:
MONGO_HOST: database
MONGO_PORT: ${MONGO_PORT}
REDIS_HOST: pubsub
REDIS_PORT: ${REDIS_PORT}
DERZIS_MNG_DB_NAME: ${DERZIS_MNG_DB_NAME}
PORT: ${DERZIS_MNG_PORT}
restart: unless-stopped
depends_on:
- pubsub
- database
networks:
- ps
- db
environment:
MONGO_HOST: database
MONGO_PORT: ${MONGO_PORT}
REDIS_HOST: pubsub
REDIS_PORT: ${REDIS_PORT}
DERZIS_MNG_DB_NAME: ${DERZIS_MNG_DB_NAME}
PORT: ${DERZIS_MNG_PORT}
volumes:
- type: bind
source: ./data/export
target: /data/export
ports:
- '${DERZIS_MNG_PORT}:${DERZIS_MNG_PORT}'
worker:
develop:
watch:
- action: rebuild
path: ./worker/src/
build:
context: ./
dockerfile: ./worker/Dockerfile
restart: unless-stopped
depends_on:
- pubsub
- database
networks:
- ps
- db
environment:
MONGO_HOST: database
MONGO_PORT: ${MONGO_PORT}
REDIS_HOST: pubsub
REDIS_PORT: ${REDIS_PORT}
DERZIS_WRK_DB_NAME: ${DERZIS_WRK_DB_NAME}
pubsub:
image: redis
networks:
- ps
restart: unless-stopped
command: redis-server --port ${REDIS_PORT}
ports:
- '${REDIS_PORT}:${REDIS_PORT}'
database:
image: mongo
command: mongod --port ${MONGO_PORT}
restart: unless-stopped
volumes:
- type: bind
source: ./data/db
target: /data/db
ports:
- '${MONGO_PORT}:${MONGO_PORT}'
networks:
- db
networks:
db:
name: db
ps:
name: ps