Deploy MQTT test backend with private viewer and Gitea CI/CD
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
name: mqtt5-test-backend
|
||||
services:
|
||||
backend:
|
||||
image: mqtt5-test-backend:${IMAGE_TAG:?Set IMAGE_TAG}
|
||||
network_mode: host
|
||||
user: "10001:10001"
|
||||
init: true
|
||||
read_only: true
|
||||
tmpfs: ["/tmp:rw,noexec,nosuid,size=16m"]
|
||||
cap_drop: [ALL]
|
||||
security_opt: ["no-new-privileges:true"]
|
||||
restart: unless-stopped
|
||||
stop_grace_period: 10s
|
||||
environment:
|
||||
TEST_MQTT5_WEB__ENABLED: "true"
|
||||
TEST_MQTT5_WEB__ADDRESS: "127.0.0.1:18080"
|
||||
TEST_MQTT5_TOPICS__OBSERVE_ALL: "true"
|
||||
TEST_MQTT5_LOGGING__RAW_PAYLOADS: "true"
|
||||
TEST_MQTT5_LOGGING__FORMAT: "json"
|
||||
TEST_MQTT5_RECEIPTS__ENABLED: "true"
|
||||
command:
|
||||
- --broker
|
||||
- tls://109.122.252.129:8884
|
||||
- --ca
|
||||
- /run/test-mqtt/ca.crt
|
||||
- --credentials
|
||||
- /run/test-mqtt/backend.json
|
||||
- --client-id
|
||||
- rm5-server-observer
|
||||
- observe
|
||||
volumes:
|
||||
- type: bind
|
||||
source: /opt/test-mqtt-5/backend/secrets/backend.json
|
||||
target: /run/test-mqtt/backend.json
|
||||
read_only: true
|
||||
bind:
|
||||
create_host_path: false
|
||||
- type: bind
|
||||
source: /opt/test-mqtt-5/backend/ca.crt
|
||||
target: /run/test-mqtt/ca.crt
|
||||
read_only: true
|
||||
bind:
|
||||
create_host_path: false
|
||||
healthcheck:
|
||||
test:
|
||||
- CMD-SHELL
|
||||
- >-
|
||||
wget -qO- http://127.0.0.1:18080/api/snapshot | grep -q '"connection":"connected"'
|
||||
interval: 10s
|
||||
timeout: 4s
|
||||
retries: 6
|
||||
start_period: 15s
|
||||
logging:
|
||||
driver: local
|
||||
options:
|
||||
max-size: 10m
|
||||
max-file: "3"
|
||||
Reference in New Issue
Block a user