-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
49 lines (47 loc) · 1.5 KB
/
compose.yml
File metadata and controls
49 lines (47 loc) · 1.5 KB
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
# Docker Compose configuration
# Usage: docker compose up -d
#
# Credentials can be provided via:
# 1. Environment variables (shown below)
# 2. Mounted secrets file (secrets.conf)
# 3. Auto-generated (printed to logs on first run)
services:
mqbase:
image: mqbase:${MQBASE_VERSION:-latest}
build:
context: .
dockerfile: docker/Dockerfile
args:
UID: ${USER_ID:-1000}
GID: ${GROUP_ID:-1000}
tags:
- mqbase:${MQBASE_VERSION:-latest}
hostname: mqbase
container_name: mqbase
volumes:
- /etc/localtime:/etc/localtime:ro
- mqbase-data:/mosquitto/data
- mqbase-log:/mosquitto/log
- ./mosquitto/config:/mosquitto/config
# Optional: mount secrets file instead of using environment variables
# - ./mqbase.secrets:/mosquitto/config/secrets.conf:ro
ports:
- 1883:1883 # MQTT
- 8883:8883 # MQTT over TLS
- 8000:8000 # libSQL HTTP
- 8080:8080 # Admin UI (nginx)
- 9001:9001 # MQTT over WebSocket
env_file:
- mqbase.properties
environment:
# Credentials via environment variables (alternative to secrets file)
- MQBASE_USER=${MQBASE_USER:-admin:admin}
- MQBASE_MQTT_USER=${MQBASE_MQTT_USER:-admin:admin}
# Use mosquitto-test.conf for testing (set MOSQUITTO_CONFIG to switch)
- MOSQUITTO_CONFIG=${MOSQUITTO_CONFIG:-/mosquitto/config/mosquitto.conf}
restart: unless-stopped
volumes:
mqbase-data:
name: mqbase-data
mqbase-log:
name: mqbase-log