Skip to content

Commit

Permalink
Merge branch 'main' into feature-acl
Browse files Browse the repository at this point in the history
  • Loading branch information
jzombie committed Jul 31, 2024
2 parents ef13877 + e0f58ed commit 64e75d3
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/actions/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: CI

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
test-mosquitto:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Docker Compose
run: |
sudo apt-get update
sudo apt-get install -y docker-compose
- name: Start Mosquitto service using Docker Compose
run: docker-compose up -d mosquitto

- name: Wait for Mosquitto to be healthy
run: |
for i in {1..10}; do
if docker inspect --format='{{.State.Status}}' mosquitto | grep -q running; then
echo "Mosquitto is running"
exit 0
else
echo "Waiting for Mosquitto to be healthy..."
sleep 10
fi
done
echo "Mosquitto did not become healthy in time"
exit 1
- name: Stop Mosquitto service using Docker Compose
run: docker-compose down
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: CI

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
test-mosquitto:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Docker Compose
run: |
sudo apt-get update
sudo apt-get install -y docker-compose
- name: Start Mosquitto service using Docker Compose
run: docker-compose up -d mosquitto

- name: Wait for Mosquitto to be healthy
run: |
for i in {1..10}; do
if docker inspect --format='{{.State.Status}}' mosquitto | grep -q running; then
echo "Mosquitto is running"
exit 0
else
echo "Waiting for Mosquitto to be healthy..."
sleep 10
fi
done
echo "Mosquitto did not become healthy in time"
exit 1
- name: Stop Mosquitto service using Docker Compose
run: docker-compose down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
![CI](https://github.com/jzombie/docker-mqtt-mosquitto-cloudflare-tunnel/actions/workflows/ci.yml/badge.svg)

# Docker MQTT Mosquitto Cloudflare Tunnel

This setup demonstrates how to configure and deploy an MQTT broker using Eclipse Mosquitto within a Docker container and securely expose it to the internet via a Cloudflare Tunnel. This setup is particularly useful for IoT applications, allowing secure and scalable message brokering over the MQTT protocol.
Expand Down

0 comments on commit 64e75d3

Please sign in to comment.