-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
42 lines (40 loc) · 893 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
42 lines (40 loc) · 893 Bytes
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
x-shared-environment: &shared-environment
MONGO_DB_URL: ${MONGO_DB_URL}
MONGO_DB_PORT: ${MONGO_DB_PORT}
DB_NAME: ${DB_NAME}
COLLECTION_NAME: ${COLLECTION_NAME}
services:
api_service:
build: ./api_service
environment:
<<: *shared-environment
ports:
- 80:80
volumes:
- ./api_service:/code
depends_on:
- mongodb
mqtt_client:
build: ./mqtt_client
environment:
<<: *shared-environment
MQTT_BROKER_URL: ${MQTT_BROKER_URL}
MQTT_BROKER_PORT: ${MQTT_BROKER_PORT}
PUBLISH_INTERVAL: ${PUBLISH_INTERVAL:-5}
depends_on:
- mosquitto
- mongodb
mosquitto:
image: eclipse-mosquitto:latest
volumes:
- ./mosquitto/config:/mosquitto/config
ports:
- 1883:1883
mongodb:
image: mongo:latest
ports:
- 27017:27017
volumes:
- dbdata:/data/db
volumes:
dbdata: