-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
109 lines (104 loc) · 3.14 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
version: '3.9'
services:
# This is a MongoDB instance that will hold the local data.
db:
image: mongo:6.0.2
hostname: db
container_name: db
environment:
MONGO_INITDB_ROOT_USERNAME: iaapa
MONGO_INITDB_ROOT_PASSWORD: fakepasswordthatwillnotwork # Required for the entrypoint user creation to work
MONGODB_CUSTOM_USERNAME: iaapa
MONGO_INITDB_DATABASE: 'iaapa'
ports:
- '27017:27017'
volumes:
- "./mongodb/data:/data/db"
- "./mongodb/secrets/:/tmp/secrets"
- "./mongodb/entrypoint/:/docker-entrypoint-initdb.d/"
- "./mongodb/mongoimport/:/tmp/mongoimport/"
rabbitmq:
environment:
PROVISIONING_CONTAINER_PATH: /tmp/provisioning
build:
context: rabbitmq/
args:
RMQ_VERSION_TAG: 3.11.2-management
hostname: rabbitmq
container_name: rabbitmq
ports:
#- "4369:4369' # RMQ EMPD Peer Discovery
- '5672:5672' # AMQP
- '5671:5671' # AMQPS (AMQP over TLS)
- '1883:1883' # MQTT
- '8883:8883' # MQTT over TLS
- '15675:15675' # Web MQTT (MQTT over WebSockets)
- '15673:15673' # Web MQTT (MQTT over WebSockets) over TLS
- '25672:25672' # Used for inter-node and CLI tools communication
- '15672:15672' # Management
- '15674:15674' # Web Stomp
volumes:
- type: bind
source: './rabbitmq/config/enabled_plugins.erl'
target: /etc/rabbitmq/enabled_plugins
read_only: true
- type: bind
source: './rabbitmq/config/rabbitmq.conf'
target: /etc/rabbitmq/rabbitmq.conf
read_only: true
- type: bind
source: './rabbitmq/provisioning'
target: /tmp/provisioning
read_only: true
- type: bind
source: './rabbitmq/secrets'
target: /tmp/secrets
rules-engine:
build:
context: rules-engine/
hostname: rules-engine
container_name: rules-engine
user: 'node'
restart: always
working_dir: /home/node/rules-engine
ports:
- '3333:3333/udp'
environment:
- LOG_STYLE=colored
- LOG_LEVEL=trace
# Set your NODE_ENV to match your COMMAND BELOW!!
- NODE_ENV=dev
- RMQ_HOST=rabbitmq
- RMQ_PROTOCOL=amqp
- UDP_PORT=3333
#- MONGODB_PASSWORD=partyForever2022
- MONGODB_HOST=db
- MONGODB_PORT=27017
- MONGODB_DATABASE=iaapa
- MONGODB_USERNAME=iaapa
# Uncomment ONE of the two commands below! (and set NODE_ENV above)
# Production Command
#command: "yarn start-compose"
# Dev Command (uses nodemon)
command: "yarn start-compose:watch"
volumes:
- type: bind
source: './rules-engine'
target: /home/node/rules-engine
- type: bind
source: './docker/scripts'
target: /scripts
- type: bind
source: './rabbitmq/secrets'
target: /tmp/rabbitmq/secrets
- type: bind
source: './mongodb/secrets'
target: /tmp/mongodb/secrets
- type: bind
source: './simulator'
target: /home/node/simulator
- type: bind
source: './message_logs'
target: /home/node/message_logs
volumes:
mongodb-data: