-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
136 lines (130 loc) · 3.55 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
services:
app:
build:
context: .
dockerfile: Dockerfile
entrypoint: ['/bin/bash', '/app/entrypoint.sh']
ports:
- '3000:3000'
depends_on:
- db
- redis
- mqtt
environment:
DATABASE_URL: 'postgres://morro_user:morro_pass@db:5432/morrotaxi'
REDIS_HOST: redis
REDIS_PORT: 6379
MQTT_HOST: mqtt
MQTT_PORT: 1883
YARN_CACHE_FOLDER: /yarn-cache
YARN_ENABLE_INLINE_BUILDS: true
YARN_ERROR_LOG_FILE: '/yarn-logs'
SERVICE_NAME: 'app'
volumes:
- .:/app
- yarn-cache:/yarn-cache
- root-node-modules:/app/node_modules
- api-node-modules:/app/apps/api/node_modules
- driver-node-modules:/app/apps/driver-app/node_modules
- rider-node-modules:/app/apps/rider-app/node_modules
- admin-node-modules:/app/apps/admin-dashboard/node_modules
- ./yarn-logs:/app/yarn-logs
mqtt-listener:
build:
context: .
dockerfile: Dockerfile
entrypoint: ['/bin/bash', '/app/entrypoint.sh']
depends_on:
- app
- db
- redis
- mqtt
environment:
DATABASE_URL: 'postgres://morro_user:morro_pass@db:5432/morrotaxi'
REDIS_HOST: redis
REDIS_PORT: 6379
MQTT_HOST: mqtt
MQTT_PORT: 1883
YARN_CACHE_FOLDER: /yarn-cache
YARN_ENABLE_INLINE_BUILDS: true
YARN_ERROR_LOG_FILE: '/yarn-logs'
SERVICE_NAME: 'mqtt-listener'
volumes:
- .:/app
- yarn-cache:/yarn-cache
- root-node-modules:/app/node_modules
- api-node-modules:/app/apps/api/node_modules
- driver-node-modules:/app/apps/driver-app/node_modules
- rider-node-modules:/app/apps/rider-app/node_modules
- admin-node-modules:/app/apps/admin-dashboard/node_modules
- ./yarn-logs:/app/yarn-logs
queue-processor:
build:
context: .
dockerfile: Dockerfile
entrypoint: ['/bin/bash', '/app/entrypoint.sh']
depends_on:
- app
- db
- redis
- mqtt
environment:
DATABASE_URL: 'postgres://morro_user:morro_pass@db:5432/morrotaxi'
REDIS_HOST: redis
REDIS_PORT: 6379
MQTT_HOST: mqtt
MQTT_PORT: 1883
YARN_CACHE_FOLDER: /yarn-cache
YARN_ENABLE_INLINE_BUILDS: true
YARN_ERROR_LOG_FILE: '/yarn-logs'
SERVICE_NAME: 'queue-processor'
volumes:
- .:/app
- yarn-cache:/yarn-cache
- root-node-modules:/app/node_modules
- api-node-modules:/app/apps/api/node_modules
- driver-node-modules:/app/apps/driver-app/node_modules
- rider-node-modules:/app/apps/rider-app/node_modules
- admin-node-modules:/app/apps/admin-dashboard/node_modules
- ./yarn-logs:/app/yarn-logs
db:
image: postgis/postgis:15-3.3
environment:
POSTGRES_USER: morro_user
POSTGRES_PASSWORD: morro_pass
POSTGRES_DB: morrotaxi
ports:
- '5432:5432'
volumes:
- postgres_data:/var/lib/postgresql/data
- ./init.sql:/apps/api/init.sql
redis:
image: redis:7.0
ports:
- '6379:6379'
volumes:
- redis_data:/data
mqtt:
image: eclipse-mosquitto
ports:
- '0.0.0.0:1883:1883'
- '0.0.0.0:8883:8883'
- '0.0.0.0:9001:9001'
volumes:
- ./apps/api/mosquitto.conf:/mosquitto/config/mosquitto.conf
- mqtt_data:/mosquitto/data
- mqtt_logs:/mosquitto/log
environment:
- LOG_DEST=file
- LOG_TYPE=all
volumes:
yarn-cache:
root-node-modules:
api-node-modules:
driver-node-modules:
rider-node-modules:
admin-node-modules:
postgres_data:
redis_data:
mqtt_data:
mqtt_logs: