mosquitto start using config section, removed custom docker image
All checks were successful
/ deploy-to-homesrv01 (push) Successful in 4m0s
All checks were successful
/ deploy-to-homesrv01 (push) Successful in 4m0s
This commit is contained in:
@@ -1,27 +0,0 @@
|
|||||||
on:
|
|
||||||
push:
|
|
||||||
schedule:
|
|
||||||
- cron: '0 3 * * *'
|
|
||||||
jobs:
|
|
||||||
deploy-docker-image:
|
|
||||||
runs-on: "ubuntu-latest"
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Log in to git.limbosolutions.com docker registry
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: git.limbosolutions.com
|
|
||||||
username: ${{ secrets.GITLIMBO_DOCKER_REGISTRY_USERNAME }}
|
|
||||||
password: ${{ secrets.GITLIMBO_DOCKER_REGISTRY_PASSWORD }}
|
|
||||||
|
|
||||||
- name: Build and push Docker Image
|
|
||||||
id: push
|
|
||||||
uses: docker/build-push-action@v6
|
|
||||||
with:
|
|
||||||
context: ${{gitea.workspace}}/docker
|
|
||||||
file: ${{gitea.workspace}}/docker/Dockerfile
|
|
||||||
push: true
|
|
||||||
tags: git.limbosolutions.com/marcio.fernandes/mosquitto:latest
|
|
||||||
|
|
||||||
@@ -9,12 +9,5 @@ jobs:
|
|||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: setup docker compose .env
|
|
||||||
run: |
|
|
||||||
cat <<EOF >${{ github.workspace }}/.env
|
|
||||||
LISTENER_PORT=1883
|
|
||||||
ALLOW_ANONYMOUS=true
|
|
||||||
EOF
|
|
||||||
|
|
||||||
- name: docker compose up
|
- name: docker compose up
|
||||||
run: docker compose up -d --pull always
|
run: docker compose up -d --pull always
|
||||||
@@ -1,23 +1,25 @@
|
|||||||
services:
|
services:
|
||||||
mosquitto:
|
mosquitto:
|
||||||
#build:
|
image: eclipse-mosquitto:latest
|
||||||
# dockerfile: Dockerfile
|
|
||||||
# context: ./docker
|
|
||||||
image: git.limbosolutions.com/marcio.fernandes/mosquitto:latest
|
|
||||||
ports:
|
ports:
|
||||||
- '1883:1883'
|
- '1883:1883'
|
||||||
- '8883:8883'
|
- '8883:8883'
|
||||||
environment:
|
environment:
|
||||||
- TZ= Europe/Lisbon
|
- TZ= Europe/Lisbon
|
||||||
- |
|
- MOSQUITTO_CONFIG_CONTENT=${MOSQUITTO_CONFIG_CONTENT}
|
||||||
MOSQUITTO_CONFIG_CONTENT=
|
|
||||||
listener ${LISTENER_PORT}
|
|
||||||
allow_anonymous ${ALLOW_ANONYMOUS}
|
|
||||||
volumes:
|
volumes:
|
||||||
- data:/mosquitto/data
|
- data:/mosquitto/data
|
||||||
|
configs:
|
||||||
|
- mosquitto_conf
|
||||||
|
command: /usr/sbin/mosquitto -c /mosquitto_conf
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
data:
|
data:
|
||||||
|
configs:
|
||||||
|
mosquitto_conf:
|
||||||
|
content: |
|
||||||
|
listener 1883
|
||||||
|
allow_anonymous true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
FROM eclipse-mosquitto:latest
|
|
||||||
LABEL org.opencontainers.image.documentation="https://git.limbosolutions.com/marcio.fernandes/mosquitto/src/branch/master/docker/README.md"
|
|
||||||
LABEL org.opencontainers.image.url="https://git.limbosolutions.com/marcio.fernandes/mosquitto"
|
|
||||||
LABEL org.opencontainers.image.description="For more information and examples check Documentation."
|
|
||||||
|
|
||||||
COPY run.sh /mosquitto/run.sh
|
|
||||||
|
|
||||||
RUN chmod +x mosquitto/run.sh
|
|
||||||
|
|
||||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
|
||||||
CMD ["/mosquitto/run.sh"]
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
# mosquitto - docker
|
|
||||||
|
|
||||||
``` yaml
|
|
||||||
services:
|
|
||||||
mosquitto:
|
|
||||||
image: git.limbosolutions.com/marcio.fernandes/mosquitto:latest
|
|
||||||
ports:
|
|
||||||
- '1883:1883'
|
|
||||||
- '8883:8883'
|
|
||||||
environment:
|
|
||||||
- TZ= Europe/Lisbon
|
|
||||||
- |
|
|
||||||
MOSQUITTO_CONFIG_CONTENT=
|
|
||||||
listener ${LISTENER_PORT}
|
|
||||||
allow_anonymous ${ALLOW_ANONYMOUS}
|
|
||||||
volumes:
|
|
||||||
- data:/mosquitto/data
|
|
||||||
restart: unless-stopped
|
|
||||||
volumes:
|
|
||||||
data:
|
|
||||||
|
|
||||||
```
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
|
|
||||||
cat << EOF > /mosquitto/config/mosquitto.conf
|
|
||||||
$MOSQUITTO_CONFIG_CONTENT
|
|
||||||
EOF
|
|
||||||
|
|
||||||
echo "-------------- config --------------"
|
|
||||||
cat /mosquitto/config/mosquitto.conf
|
|
||||||
echo "------------------------------------"
|
|
||||||
|
|
||||||
/usr/sbin/mosquitto -c /mosquitto/config/mosquitto.conf
|
|
||||||
Reference in New Issue
Block a user