Skip to content

Commit

Permalink
add: debug container
Browse files Browse the repository at this point in the history
  • Loading branch information
rhblind committed Sep 20, 2024
1 parent cdb04d6 commit 23368d2
Showing 1 changed file with 21 additions and 15 deletions.
36 changes: 21 additions & 15 deletions .github/workflows/elixir.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ jobs:
build:
name: Build and test
runs-on: ubuntu-20.04
services:
mosquitto:
image: eclipse-mosquitto:2.0
ports:
- "1883:1883"
- "1884:1884"
# volumes:
# - ${{ github.workspace }}/.moquitto:/mosquitto/config
options: --name mqtt
# services:
# mosquitto:
# image: eclipse-mosquitto:2.0
# ports:
# - "1883:1883"
# - "1884:1884"
# # volumes:
# # - ${{ github.workspace }}/.moquitto:/mosquitto/config
# options: --name mqtt
strategy:
fail-fast: false
matrix:
Expand All @@ -41,14 +41,20 @@ jobs:
- name: Check out this repository
uses: actions/checkout@v4

- name: Copy Mosquitto config
run: docker cp -a ${{ github.workspace }}/.mosquitto mqtt:/mosquitto/config
- name: Start the Mosquitto MQTT broker
run: |
docker run \
--name mqtt \
-v ${{ github.workspace }}./mosquitto:/mosquitto/config \
-p 1883:1883 \
-p 1884:1884 \
eclipse-mosquitto:2.0
# Ensure to restart MQTT after checkout to correctly bind the config volume
- name: Restart MQTT
uses: docker://docker
with:
args: docker restart mqtt
# - name: Restart MQTT
# uses: docker://docker
# with:
# args: docker restart mqtt

- run: docker inspect mqtt
- run: docker container exec mqtt cat /mosquitto/config/mosquitto.conf
Expand Down

0 comments on commit 23368d2

Please sign in to comment.