-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
42 lines (42 loc) · 1.01 KB
/
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
services:
web:
build: .
restart: always
ports:
- "3123:3000" # change 3123 to another port if needed
depends_on:
- db
- mqtt
environment:
POSTGRES_ADDRESS: db
POSTGRES_PORT: 5432
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: mt
MQTT_ADDRESS: mqtt://mqtt
MQTT_CLIENTID: mt-stats
db:
image: postgres:16
restart: always
ports:
- "5444:5432" # optional - allows direct connection to db with something like pgadmin
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: mt
volumes:
- ./assets/init.sql:/docker-entrypoint-initdb.d/init.sql
- db_data:/var/lib/postgresql/data
mqtt:
image: "eclipse-mosquitto:2"
restart: always
ports:
- "1883:1883"
volumes:
- ./assets/mosquitto.conf:/mosquitto/config/mosquitto.conf
- mqtt_data:/mosquitto/data
- mqtt_log:/mosquitto/log
volumes:
db_data:
mqtt_data:
mqtt_log: