Compare commits
17 Commits
v1.7.11
...
paho-v2-up
| Author | SHA1 | Date | |
|---|---|---|---|
| 2adc527693 | |||
| af92529ac8 | |||
| e1e0cf0ff2 | |||
| 62d935ba4a | |||
| e25118fc33 | |||
| 2a33fc9302 | |||
| 5b14168d6b | |||
| b55c3df231 | |||
| ac3ad18d84 | |||
| dadbccbebf | |||
| fa0c5dd0c5 | |||
| 14ec31d1cc | |||
| 42be3b4f0c | |||
| e70036617a | |||
| 78c9ae57b4 | |||
| 154ccb0c91 | |||
| 60249b9c1e |
@@ -14,10 +14,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v4.1.1
|
||||||
|
|
||||||
- name: Install Docker
|
|
||||||
run: curl -fsSL https://get.docker.com | sh
|
|
||||||
|
|
||||||
- name: Build Docker image
|
- name: Build Docker image
|
||||||
run: docker build -t harbor.evanshome.io/library/py-eagle-mqtt:dev ./Docker/
|
run: docker build -t harbor.evanshome.io/library/py-eagle-mqtt:dev ./Docker/
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ jobs:
|
|||||||
name: Patch
|
name: Patch
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4.1.1
|
||||||
with:
|
with:
|
||||||
fetch-depth: '0'
|
fetch-depth: '0'
|
||||||
- name: Minor version for each merge
|
- name: Minor version for each merge
|
||||||
@@ -36,10 +36,14 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v4.1.1
|
||||||
|
|
||||||
- name: Install Docker
|
- name: Login to Harbor
|
||||||
run: curl -fsSL https://get.docker.com | sh
|
uses: docker/login-action@v2.2.0
|
||||||
|
with:
|
||||||
|
registry: harbor.evanshome.io
|
||||||
|
username: "robot$registry-bot"
|
||||||
|
password: ${{ secrets.HARBOR_PASSWORD }}
|
||||||
|
|
||||||
- name: Build Docker image
|
- name: Build Docker image
|
||||||
run: docker build -t harbor.evanshome.io/library/py-eagle-mqtt:latest ./Docker/
|
run: docker build -t harbor.evanshome.io/library/py-eagle-mqtt:latest ./Docker/
|
||||||
@@ -50,12 +54,10 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.REPO_PUSH_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.REPO_PUSH_TOKEN }}
|
||||||
WITH_V: true
|
WITH_V: true
|
||||||
|
GIT_API_TAGGING: false
|
||||||
|
|
||||||
- name: tag with name
|
- name: tag with name
|
||||||
run: docker tag harbor.evanshome.io/library/py-eagle-mqtt:latest harbor.evanshome.io/library/py-eagle-mqtt:${{ steps.taggerFinal.outputs.new_tag }}
|
run: docker tag harbor.evanshome.io/library/py-eagle-mqtt:latest harbor.evanshome.io/library/py-eagle-mqtt:${{ steps.taggerFinal.outputs.new_tag }}
|
||||||
|
|
||||||
- name: Login to Harbor
|
|
||||||
run: docker login -u ${{ secrets.HARBOR_USERNAME }} -p ${{ secrets.HARBOR_PASSWORD }} harbor.evanshome.io
|
|
||||||
|
|
||||||
- name: Push Docker image to Harbor
|
- name: Push Docker image to Harbor
|
||||||
run: docker push --all-tags harbor.evanshome.io/library/py-eagle-mqtt
|
run: docker push --all-tags harbor.evanshome.io/library/py-eagle-mqtt
|
||||||
@@ -31,7 +31,7 @@ build:
|
|||||||
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
|
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
|
||||||
|
|
||||||
release:
|
release:
|
||||||
image: node:20.10.0-alpine3.18
|
image: node:20.11.1-alpine3.18
|
||||||
stage: release
|
stage: release
|
||||||
only:
|
only:
|
||||||
refs:
|
refs:
|
||||||
|
|||||||
@@ -14,14 +14,20 @@ LABEL org.label-schema.vendor="Evan Richardson"
|
|||||||
LABEL org.label-schema.docker.cmd="docker run --name=py-eagle-mqtt -e MQTT_BROKER_IP=<IP> -e MQTT_BROKER_PORT=1883 -p 22042:22042 -d evanrich/py-eagle-mqtt"
|
LABEL org.label-schema.docker.cmd="docker run --name=py-eagle-mqtt -e MQTT_BROKER_IP=<IP> -e MQTT_BROKER_PORT=1883 -p 22042:22042 -d evanrich/py-eagle-mqtt"
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY requirements.txt /app
|
COPY requirements.txt /app
|
||||||
COPY ./src/conf/logrotate/tHome /etc/logrotate.d/
|
COPY ./src/conf/logrotate/tHome /etc/logrotate.d/
|
||||||
|
|
||||||
ENV PYTHONPATH=/app/src/python
|
ENV PYTHONPATH=/app/src/python
|
||||||
RUN apk --update add --no-cache logrotate \
|
|
||||||
&& apk upgrade \
|
RUN apk --update add --no-cache logrotate && \
|
||||||
&& pip3 install --no-cache-dir --upgrade pip \
|
apk upgrade && \
|
||||||
&& pip3 install --no-cache-dir -r requirements.txt
|
pip3 install --no-cache-dir --upgrade pip && \
|
||||||
|
pip3 install --no-cache-dir -r requirements.txt && \
|
||||||
|
rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
COPY . /app
|
COPY . /app
|
||||||
CMD ["/app/src/bin/tHome-eagle.py", "-c", "/app/src/conf"]
|
|
||||||
|
CMD ["python3", "-u", "/app/src/bin/tHome-eagle.py", "-c", "/app/src/conf", "-l", "stdout"]
|
||||||
|
|
||||||
EXPOSE 22042
|
EXPOSE 22042
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
paho-mqtt==1.6.1
|
paho-mqtt~=2.0.0
|
||||||
bottle==0.12.25
|
bottle==0.12.25
|
||||||
defusedxml==0.7.1
|
defusedxml==0.7.1
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ class Client ( mqtt.Client ):
|
|||||||
self.on_connect = Client.on_connect
|
self.on_connect = Client.on_connect
|
||||||
self.on_message = Client.on_message
|
self.on_message = Client.on_message
|
||||||
|
|
||||||
def on_connect( self, userData, flags, rc ):
|
def on_connect( self, userData, flags, reason_code, properties ):
|
||||||
self.subscribe( '#' )
|
self.subscribe( '#' )
|
||||||
|
|
||||||
def on_message( self, userData, msg ):
|
def on_message( self, userData, msg ):
|
||||||
@@ -62,4 +62,4 @@ client.loop_start()
|
|||||||
while True:
|
while True:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
client.loop_stop( force=True )
|
client.loop_stop()
|
||||||
|
|||||||
Reference in New Issue
Block a user