initial selfbuild docker
This commit is contained in:
@@ -22,15 +22,8 @@ spec:
|
||||
release: mqtt
|
||||
spec:
|
||||
containers:
|
||||
- name: mosquitto-exporter
|
||||
image: docker-registry.lan/mosquitto-exporter:arm64
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 9234
|
||||
name: mqtt-exporter
|
||||
protocol: TCP
|
||||
- name: mqtt-mosquitto
|
||||
image: eclipse-mosquitto:latest
|
||||
image: docker-registry.lan/mosquitto:arm64
|
||||
imagePullPolicy: Always
|
||||
livenessProbe:
|
||||
failureThreshold: 3
|
||||
@@ -57,11 +50,11 @@ spec:
|
||||
timeoutSeconds: 1
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 256Mi
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 100Mi
|
||||
memory: 24Mi
|
||||
requests:
|
||||
cpu: 20m
|
||||
memory: 10Mi
|
||||
terminationMessagePath: /dev/termination-log
|
||||
terminationMessagePolicy: File
|
||||
volumeMounts:
|
||||
@@ -72,6 +65,13 @@ spec:
|
||||
- mountPath: /mosquitto/data
|
||||
name: mosquitto-data
|
||||
subPath: mosquitto/data
|
||||
- name: mosquitto-exporter
|
||||
image: docker-registry.lan/mosquitto-exporter:arm64
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 9234
|
||||
name: mqtt-exporter
|
||||
protocol: TCP
|
||||
dnsPolicy: ClusterFirst
|
||||
restartPolicy: Always
|
||||
schedulerName: default-scheduler
|
||||
@@ -141,6 +141,8 @@ data:
|
||||
mosquitto.conf: |-
|
||||
log_dest stdout
|
||||
listener 1883
|
||||
listener 9090
|
||||
#listener 9090
|
||||
protocol websockets
|
||||
persistence true
|
||||
persistence_location /mosquitto/data
|
||||
|
||||
|
||||
19
apps/mosquitto/Dockerfile
Normal file
19
apps/mosquitto/Dockerfile
Normal file
@@ -0,0 +1,19 @@
|
||||
FROM debian:buster-slim
|
||||
|
||||
RUN echo 'Acquire::http::proxy "http://172.23.255.1:3142";' >/etc/apt/apt.conf.d/proxy
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
mosquitto mosquitto-clients && \
|
||||
apt-get clean -y && \
|
||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
# Op port
|
||||
EXPOSE 1883
|
||||
# Stats port
|
||||
#EXPOSE 9090
|
||||
|
||||
ADD docker-entrypoint.sh /usr/bin/
|
||||
|
||||
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||
|
||||
CMD ["/usr/sbin/mosquitto", "-c", "/mosquitto/config/mosquitto.conf"]
|
||||
5
apps/mosquitto/docker-entrypoint.sh
Normal file
5
apps/mosquitto/docker-entrypoint.sh
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
exec "$@"
|
||||
Reference in New Issue
Block a user